n=int(input()) u,t="101","010" for i in range(1,20): s=u*i c=0 while(u in s): s=s.replace(u,t,1) c+=1 print(c)