N=int(input()) D=0 while N: D+=1 if D%7==0: N+=6 N-=1 print(D)