#include<bits/stdc++.h>
using namespace std;
int main()
{
    int  a;
    cin>>a;
    int res=a*(1+a+a*a);
    cout<<res;
}


#include <bits/stdc++.h>
using namespace std;
void h(){
  cout << "Hello World" << endl;
  exit(0);
}
int main() {
  int x,a,b; cin>>x;
  if(x==1) h();
  cin>>a>>b;
  cout << a+b << endl;
}