S=int(input()) S=S//3 i=0 B=1 while B