x = int(input()) now = 0 turn = 0 ans = 0 while x != now: if turn%7 in (0,1,4): now += 2 ans += 2 else: now -= 1 ans += 1 turn += 1 print(ans)