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