#include #define show(x) cerr << #x << " = " << x << endl using namespace std; using ull = unsigned long long; template vector Vec(int n, T v) { return vector(n, v); } template auto Vec(int n, Args... args) { auto val = Vec(args...); return vector(n, move(val)); } int main() { cin.tie(0); ios::sync_with_stdio(false); int P; cin >> P; constexpr ull ans[19] = { 3ULL, 45ULL, 513ULL, 5625ULL, 60633ULL, 645705ULL, 6811353ULL, 71302185ULL, 741719673ULL, 7675477065ULL, 79079293593ULL, 811713642345ULL, 8305422781113ULL, 84748805030025ULL, 862739245270233ULL, 8764653207432105ULL, 88881878866888953ULL, 899936909802000585ULL, 9099432188218005273ULL, }; cout << ans[P - 1] << endl; return 0; }