main = readLn >>= print . soroban soroban n = nu * (nl + 1) + nl where nu = n - nl nl = div n 2