#include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
if (x % 2 == 0) {
x = x * x * x;
}
else {
x += 3;
cout << x;
return 0;
#include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
if (x % 2 == 0) {
x = x * x * x;
}
else {
x += 3;
}
cout << x;
return 0;
}