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