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