#pragma region includes, macros #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long i64; typedef pair P; template const T INF = numeric_limits::max(); template const T SINF = numeric_limits::max() / 10; static const i64 MOD = 1000000007; //int dx[4] = {0,1,0,-1}, dy[4] = {-1,0,1,0}; //int dx[5] = {-1,0,0,0,1}, dy[5] = {0,-1,0,1,0}; int dx[8] = {-1,0,1,1,1,0,-1,-1}, dy[8] = {1,1,1,0,-1,-1,-1,0}; //int dx[9] = {-1,0,1,1,1,0,-1,-1,0}, dy[9] = {1,1,1,0,-1,-1,-1,0,0}; struct edge { i64 from, to, cost; edge(i64 to, i64 cost) : from(-1), to(to), cost(cost) {} edge(i64 src, i64 to, i64 cost) : from(src), to(to), cost(cost) {} }; template vector make_v(size_t a){return vector(a);} template auto make_v(size_t a,Ts... ts){ return vector(ts...))>(a,make_v(ts...)); } template typename enable_if::value==0>::type fill_v(T &t,const V &v){t=v;} template typename enable_if::value!=0>::type fill_v(T &t,const V &v){ for(auto &e:t) fill_v(e,v); } #pragma endregion int main(){ /* vector a(200), c(200); a[1] = 3; c[1] = 5; for(int i = 2; i < 100; ++i){ a[i] = 3*a[i - 1] + 2*c[i-1]+1; c[i] = 4*a[i-1] + 3*c[i - 1] + 2; cout << a[i] << ", " << a[i] + 1 << ", " << c[i] << endl; } return 0; */ i64 ans[19][3] = {{3, 4, 5} ,{20, 21, 29} ,{119, 120, 169} ,{4059, 4060, 5741} ,{23660, 23661, 33461} ,{137903, 137904, 195025} ,{803760, 803761, 1136689} ,{27304196, 27304197, 38613965} ,{159140519, 159140520, 225058681} ,{927538920, 927538921, 1311738121} ,{31509019100, 31509019101, 44560482149} ,{183648021599, 183648021600, 259717522849} ,{1070379110496, 1070379110497, 1513744654945} ,{36361380737780, 36361380737781, 51422757785981} ,{211929657785303, 211929657785304, 299713796309065} ,{1235216565974040, 1235216565974041, 1746860020068409} ,{7199369738058939, 7199369738058940, 10181446324101389} ,{244566641436218639, 244566641436218640, 345869461223138161} ,{1425438846754932240, 1425438846754932241, 2015874949414289041}}; i64 x; cin >> x; --x; cout << ans[x][0] << " " << ans[x][1] << " " << ans[x][2] << endl; }