N = int(input()) print(N if N<=3 else (N-3)*5+3)