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