k=1while k!="0": k=format(int(input()),"b") if k!="0":print(f"The parity of {k} is {sum([int(x) for x in k])} (mod 2).")