def f(n) if n<7 then puts n else puts (n-6)*6+n end end f(gets.to_i)