#ifndef HIDDEN_IN_VS // 折りたたみ用 // 警告の抑制 #define _CRT_SECURE_NO_WARNINGS // ライブラリの読み込み #include using namespace std; // 型名の短縮 using ll = long long; // -2^63 ~ 2^63 = 9 * 10^18(int は -2^31 ~ 2^31 = 2 * 10^9) using pii = pair; using pll = pair; using pil = pair; using pli = pair; using vi = vector; using vvi = vector; using vvvi = vector; using vl = vector; using vvl = vector; using vvvl = vector; using vb = vector; using vvb = vector; using vvvb = vector; using vc = vector; using vvc = vector; using vvvc = vector; using vd = vector; using vvd = vector; using vvvd = vector; template using priority_queue_rev = priority_queue, greater>; using Graph = vvi; // 定数の定義 const double PI = acos(-1); const vi DX = { 1, 0, -1, 0 }; // 4 近傍(下,右,上,左) const vi DY = { 0, 1, 0, -1 }; int INF = 1001001001; ll INFL = 4004004004004004004LL; double EPS = 1e-12; // 入出力高速化 struct fast_io { fast_io() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(18); } } fastIOtmp; // 汎用マクロの定義 #define all(a) (a).begin(), (a).end() #define sz(x) ((int)(x).size()) #define lbpos(a, x) (int)distance((a).begin(), std::lower_bound(all(a), x)) #define ubpos(a, x) (int)distance((a).begin(), std::upper_bound(all(a), x)) #define Yes(b) {cout << ((b) ? "Yes\n" : "No\n");} #define rep(i, n) for(int i = 0, i##_len = int(n); i < i##_len; ++i) // 0 から n-1 まで昇順 #define repi(i, s, t) for(int i = int(s), i##_end = int(t); i <= i##_end; ++i) // s から t まで昇順 #define repir(i, s, t) for(int i = int(s), i##_end = int(t); i >= i##_end; --i) // s から t まで降順 #define repe(v, a) for(const auto& v : (a)) // a の全要素(変更不可能) #define repea(v, a) for(auto& v : (a)) // a の全要素(変更可能) #define repb(set, d) for(int set = 0; set < (1 << int(d)); ++set) // d ビット全探索(昇順) #define repp(a) sort(all(a)); for(bool a##_perm = true; a##_perm; a##_perm = next_permutation(all(a))) // a の順列全て(昇順) #define smod(n, m) ((((n) % (m)) + (m)) % (m)) // 非負mod #define uniq(a) {sort(all(a)); (a).erase(unique(all(a)), (a).end());} // 重複除去 #define EXIT(a) {cout << (a) << endl; exit(0);} // 強制終了 // 汎用関数の定義 template inline ll pow(T n, int k) { ll v = 1; rep(i, k) v *= n; return v; } template inline bool chmax(T& M, const T& x) { if (M < x) { M = x; return true; } return false; } // 最大値を更新(更新されたら true を返す) template inline bool chmin(T& m, const T& x) { if (m > x) { m = x; return true; } return false; } // 最小値を更新(更新されたら true を返す) // 演算子オーバーロード template inline istream& operator>>(istream& is, pair& p) { is >> p.first >> p.second; return is; } template inline istream& operator>>(istream& is, vector& v) { repea(x, v) is >> x; return is; } template inline vector& operator--(vector& v) { repea(x, v) --x; return v; } template inline vector& operator++(vector& v) { repea(x, v) ++x; return v; } // 手元環境(Visual Studio) #ifdef _MSC_VER #include "local.hpp" // 提出用(gcc) #else inline int popcount(int n) { return __builtin_popcount(n); } inline int popcount(ll n) { return __builtin_popcountll(n); } inline int lsb(int n) { return n != 0 ? __builtin_ctz(n) : -1; } inline int lsb(ll n) { return n != 0 ? __builtin_ctzll(n) : -1; } inline int msb(int n) { return n != 0 ? (31 - __builtin_clz(n)) : -1; } inline int msb(ll n) { return n != 0 ? (63 - __builtin_clzll(n)) : -1; } #define gcd __gcd #define dump(...) #define dumpel(v) #define dump_list(v) #define input_from_file(f) #define output_to_file(f) #define Assert(b) { if (!(b)) while (1) cout << "OLE"; } #endif #endif // 折りたたみ用 //--------------AtCoder 専用-------------- #include using namespace atcoder; //using mint = modint1000000007; using mint = modint998244353; //using mint = modint; // mint::set_mod(m); istream& operator>>(istream& is, mint& x) { ll x_; is >> x_; x = x_; return is; } ostream& operator<<(ostream& os, const mint& x) { os << x.val(); return os; } using vm = vector; using vvm = vector; using vvvm = vector; //---------------------------------------- vi ans = { 677, 948, 2184, 1752, 715, 920, 3057, 76, 785, 202, 1929, 469, 766, \ 380, 1244, 186, 954, 740, 1344, 2398, 899, 142, 113, 2027, 513, 2672, \ 137, 767, 986, 1054, 479, 727, 158, 2041, 907, 5, 2126, 729, 104, \ 1585, 294, 0, 2, 269, 3060, 273, 542, 198, 1384, 144, 419, 2552, 187, \ 2990, 521, 563, 485, 96, 459, 471, 210, 2521, 598, 1145, 434, 960, \ 3661, 1350, 21, 1755, 1293, 950, 357, 741, 236, 1050, 55, 1572, 1542, \ 2046, 315, 881, 938, 525, 993, 375, 239, 42, 1128, 2347, 3976, 2677, \ 1503, 1770, 701, 2591, 1747, 972, 247, 1635, 4309, 228, 579, 368, \ 530, 1791, 192, 549, 619, 28, 75, 1343, 136, 4, 143, 458, 1678, 1326, \ 524, 700, 367, 1840, 160, 1456, 2274, 2790, 161, 755, 1177, 114, 109, \ 1242, 255, 1270, 4919, 499, 2802, 9, 1376, 336, 1060, 2588, 26, 1282, \ 3039, 749, 662, 69, 122, 119, 2567, 292, 1418, 304, 1970, 1367, 737, \ 810, 331, 2791, 282, 1382, 1353, 673, 138, 610, 162, 1037, 855, 762, \ 6311, 2980, 774, 99, 217, 167, 92, 428, 189, 287, 776, 2999, 987, \ 2258, 1657, 233, 940, 349, 502, 846, 710, 1055, 257, 450, 1287, 990, \ 320, 115, 359, 826, 1118, 480, 4715, 2944, 260, 422, 444, 2440, 265, \ 12, 2211, 468, 1590, 728, 155, 3149, 433, 54, 314, 1875, 1276, 271, \ 159, 1042, 68, 2043, 854, 91, 2305, 256, 1761, 313, 1965, 1481, 527, \ 2893, 1284, 370, 1008, 306, 390, 908, 528, 89, 1661, 221, 1371, 1147, \ 1436, 2220, 101, 1029, 334, 3280, 382, 362, 6, 3776, 152, 2164, 125, \ 1540, 285, 1538, 815, 2055, 1517, 2127, 723, 452, 644, 929, 134, 10, \ 385, 371, 46, 1558, 1169, 62, 833, 783, 1850, 4592, 105, 1139, 403, \ 85, 80, 1187, 3304, 958, 3953, 1653, 640, 337, 307, 278, 635, 1511, \ 688, 793, 426, 1116, 3712, 1032, 323, 295, 242, 1428, 714, 765, 141, \ 157, 1, 95, 2520, 909, 238, 971, 27, 3, 1035, 2621, 438, 2198, 1389, \ 2489, 532, 1267, 264, 1874, 90, 1283, 4144, 554, 1487, 384, 1246, \ 3066, 425, 140, 862, 642, 2002, 886, 625, 587, 2579, 1737, 274, 2225, \ 1705, 219, 436, 1076, 2827, 344, 632, 222, 387, 1048, 73, 311, 663, \ 2093, 626, 1868, 543, 4132, 199, 398, 231, 1663, 342, 836, 3644, \ 2253, 70, 1669, 50, 417, 841, 123, 262, 584, 510, 559, 17, 703, 1910, \ 2004, 120, 2137, 515, 779, 1629, 145, 394, 1296, 2078, 102, 347, 83, \ 15, 169, 2155, 131, 275, 505, 1067, 1052, 2026, 1584, 293, 1072, \ 1977, 235, 992, 1502, 1336, 629, 366, 254, 1281, 291, 1026, 188, 501, \ 2285, 3141, 373, 1041, 305, 88, 3666, 1516, 45, 1078, 1107, 1427, \ 3625, 437, 383, 424, 4264, 310, 341, 558, 1310, 1216, 1066, 253, \ 1077, 2018, 1215, 564, 176, 128, 171, 1085, 486, 7, 1135, 1340, 565, \ 2828, 1953, 490, 37, 377, 196, 97, 770, 1735, 345, 1253, 1300, 463, \ 177, 460, 962, 980, 153, 603, 129, 1198, 684, 594, 3104, 876, 650, \ 165, 1369, 680, 1024, 223, 213, 888, 206, 616, 540, 1058, 283, 2577, \ 126, 538, 822, 1940, 250, 2085, 739, 512, 2125, 1383, 328, 2380, 356, \ 487, 1648, 227, 74, 1306, 8, 1329, 1354, 281, 286, 1011, 825, 674, \ 467, 1379, 312, 1146, 1028, 722, 1373, 1744, 4278, 241, 94, 1341, \ 2170, 139, 435, 664, 816, 509, 2924, 1471, 1256, 628, 575, 309, 1196, \ 1339, 566, 961, 164, 2965, 1519, 1631, 2245, 4118, 163, 474, 57, 475, \ 1920, 1811, 40, 1351, 1954, 1908, 789, 1038, 572, 1869, 58, 856, 666, \ 544, 801, 446, 1205, 225, 301, 22, 405, 2119, 453, 1921, 942, 48, \ 1200, 38, 1625, 31, 412, 758, 200, 117, 78, 686, 3063, 410, 7176, \ 670, 147, 930, 951, 1099, 478, 197, 520, 209, 1302, 41, 2129, 548, \ 135, 613, 495, 25, 303, 720, 98, 232, 358, 11, 53, 67, 2767, 1891, \ 100, 771, 61, 782, 731, 1102, 237, 1388, 1873, 861, 218, 386, 2252, \ 8323, 606, 168, 1051, 365, 44, 1426, 175, 837, 769, 602, 352, 2081, \ 1647, 280, 2734, 93, 574, 56, 2115, 1161, 47, 757, 519, 2167, 933, \ 1627, 351, 573, 1559, 6982, 429, 1149, 918, 190, 1180, 71, 35, 1170, \ 2959, 1530, 3115, 430, 2074, 2436, 1773, 1670, 2842, 1496, 59, 297, \ 63, 653, 19, 857, 696, 777, 461, 1795, 33, 316, 2455, 784, 1273, \ 1080, 726, 1452, 418, 1144, 963, 1164, 1746, 191, 981, 988, 442, 545, \ 1527, 672, 1020, 939, 319, 2472, 154, 1600, 526, 1443, 333, 124, \ 1181, 2291, 277, 1173, 3198, 890, 263, 624, 805, 72, 397, 994, 393, \ 82, 234, 1166, 913, 557, 621, 36, 376, 593, 875, 249, 511, 226, 1378, \ 240, 1493, 1948, 1396, 404, 941, 685, 267, 24, 1239, 560, 43, 1857, \ 350, 1179, 1576, 18, 725, 318, 1262, 396, 81, 1129, 23, 1887, 244, \ 1693, 245, 1188, 638, 969, 1607, 299, 704, 492, 406, 414, 3435, 2287, \ 431, 1694, 877, 711, 65, 2340, 2722, 2152, 897, 112, 2240, 1265, \ 1014, 959, 1159, 454, 246, 1924, 1189, 608, 258, 121, 1133, 507, 166, \ 4037, 449, 2439, 943, 1654, 1943, 1370, 151, 451, 1771, 1186, 639, \ 1555, 764, 1551, 3600, 641, 1581, 1005, 1111, 49, 516, 14, 991, 290, \ 1125, 3250, 204, 1201, 780, 2655, 1360, 1233, 355, 1673, 1932, 321, \ 308, 473, 39, 224, 30, 116, 208, 705, 60, 1312, 973, 279, 518, 2958, \ 1757, 32, 2973, 1526, 360, 889, 733, 248, 493, 395, 298, 64, 1297, \ 1408, 150, 1550, 180, 354, 207, 1512, 149 }; int main() { // input_from_file("input.txt"); // output_to_file("output.txt"); // はにみし かくい はにすとか // となことかすにみき いたなちり // から かくい // きにひいみ さ // はすらも // とたすかゅふょ // find the first // substring equal // to the // given x // from // sqrt(2) // find the first substring equal to the given x from sqrt(2). // sqrt(2) から、与えられた x に等しい最初の部分文字列を求めよ。 // 106.109 -> 101.102 // i : 12345678... // √2 = 1.41421356... // 421 int x; cin >> x; cout << ans[x - 100] << endl; }