N=int(input()) bit=1 ans=0 while bit