#include <bits/stdc++.h>   using namespace std;   long long res = 1;   int main() {     int n;     cin >> n;     for (int i = 1; i < n; ++i) {       res += i * 12;     }     cout << res;     return 0;   }   