#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
long long x;
cin >> x;
cout << x*x + 2*x + 1 ;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkKewogbG9uZyBsb25nIHg7CiBjaW4gPj4geDsKIGNvdXQgPDwgeCp4ICsgMip4ICsgMSA7CiAgICByZXR1cm4gMDsKfQ==