def to2(n: int): return bin(n)[2:]
def alg(ord):
res = 1
for i in ord: res += 4 if i == "0" else -3
return res
s = set()
for n in range(0, 128): s.add(alg(to2(n)))
ans = len(s)
print(ans)
ZGVmIHRvMihuOiBpbnQpOiByZXR1cm4gYmluKG4pWzI6XQoKCmRlZiBhbGcob3JkKToKCXJlcyA9IDEKCWZvciBpIGluIG9yZDogcmVzICs9IDQgaWYgaSA9PSAiMCIgZWxzZSAtMwoJcmV0dXJuIHJlcwoKCnMgPSBzZXQoKQpmb3IgbiBpbiByYW5nZSgwLCAxMjgpOiBzLmFkZChhbGcodG8yKG4pKSkKYW5zID0gbGVuKHMpCnByaW50KGFucyk=