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