N = int(input()) if N == 1 : print(1) elif N == 2: print(2) else: k = N - 3 a = k * 5 + 3 print(a)