// Arup Guha
// 6/2/2026
// Solution: N Days of Christmas
// https://open.kattis.com/problems/thendaysofchristmas

using namespace std;
#include <bits/stdc++.h>

int main() {

    int n;
    cin >> n;

    long long total = 0, today = 0;

    // day I am on.
    for (int day=1; day<=n; day++) {

	// Just add up gifts for today.	Valid if n <= 366.
        today = 0;
        for (int i=1; i<=day; i++)
            today += i;

	// Update total.
        total = total + today;
    }

    // This is what they want.
    cout << today << "\n" << total << "\n";
    return 0;
}
