n = int(input()) if n <= 3: print(n) exit() n -= 3 print(n * 5 + 3)