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