n = gets.to_i if n % 2 == 0 p (n * n * n + 3 * n * n + 5 * n - 6) / 6 else p (n * n * n + 3 * n * n + 5 * n - 3) / 6 end