#include <iostream>

using namespace std;

int main(){
    int n, i;
    double s = 0;

    cout << "Input N: ";
    cin >> n;

    if (n < 1){
        cout << "N must be positive." << endl;
        return 0;
    }

    i = 1;
    while (i <= n){
        s = s + ((2 * i) * (2 * i));
        i++;
    }

    cout << "Function result: " << s << endl;    

    return 0;
}