local l = io.read("*l")
l = tonumber(l)
local result = 0
if l == 1 then 
  result = 0
elseif l % 2 == 0 then
  result = (l - 1) * (l / 2)
else
  result = (l - 2) * (l / 2) + (l / 2)
end
print(~~(result))