// 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++) {

        // Speed up # 1 use formula for sum of 1 to n.
	// This will work for n upto 1,000,000. The cast
	// is required to avoid overflow. So this line
	// combats 2 key competitive programming isses:
	// TLE responses and overflow errors.
        today = ((long long)day)*(day+1)/2;
        total = total + today;
    }

    cout << today << "\n" << total << "\n";
    return 0;
}
