n = int(input()) cnt = 0 ans = 0 c = 0 while True: if (c % 7 in [0, 1, 4]): cnt += 2 ans += 2 else: cnt -= 1 ans += 1 c += 1 if cnt == n: break print(ans)