n = gets.to_i m = Integer.sqrt(n) p n==m**2 ? n*2-1 : n*2