A=int(raw_input()) F_p=[3,5,17,257,65537] V=[1] for i in range(1,(1<<5)): f=1 for j in range(0,5): if (i&(1<0: while n>0 and A