$n = gets.to_i def func(x) return (x + 1) * ($n - x + 1) - 1 end if $n % 2 == 0 puts func($n / 2) else puts [func($n / 2), func($n / 2 + 1)].min end