from itertools import count from sys import stdin def main(): input = lambda: stdin.readline()[:-1] N = int(input()) ans = 0 for n in count(1): ans += 1 if not n % 7: N += 6 N -= 1 if not N: break print(ans) main()