def g(n,b): if n<1:return 0 if n>1:return g(n,b>>1) return(g(b-1-n,b)+1)%4 n=int(input());A=[[1,0,0,0]];Z=[0]*4;K=(0,1,2,3);s=0 while sum(A[-1])