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