n = gets.to_i if n <= 3 puts n else puts (n - 3) * 5 + 3 end