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