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