A = [
399 298 318 347 303 379 302 297 298 322 337 310 298 327 312 317 305 344 309 364 316 303 516 711 1776 11283 1840 2634 12556 10619 1655 1640 9045 905 233 69 15 17 20 21 14 14 10 17 18 15 17 20 14 16 12 10 19 16 18 13 22 12 17 12 13 11 16 11 10 15 7 14 7 16 15 11 9 9 8 9 11 17 9 10 9 14 13 8 12 10 8 9 9 6 9 10 6 11 14 11 9 15 11 10 15 9 7 8 9 9 4 7 12 9 14 8 17 10 6 10 6 8 5 10 5 3 9 7 3 8 9 7 4 4 8 12 6 6 7 8 5 13 5 9 8 10 7 4 7 1 6 5 5 6 8 6 3 9 8 7 9 8 3 10 4 1 3 1 1 4 8 6 10 3 5 2 3 4 2 2 8 5 6 4 5 3 1 7 3 5 6 5 1 7 2 2 3 1 4 5 2 1 2 9 6 1 2 1 4 2 5 2 3 1 3 2 2 4 2 5 4 5 7 4 4 3 5 3 5 1 2 4 3 4 1 3 3 1 4 2 8 2 1 2 4 2 7 3 5 4 3 2 1 2 2 1 4 2 3 5 2 3 2 1 0 3 4 0 2 4 3 1 0 0 3 2 3 7 2 2 2 7 2 3 1 5 1 0 1 3 2 4 4 3 4 1 1 1 2 3 2 3 0 1 0 4 3 1 3 1 0 6 2 1 1 1 1 1 3 1 5 1 2 2 0 2 1 2 2 2 6 2 2 1 4 3 4 2 3 5 1 2 1 1 3 1 1 3 4 0 4 1 0 2 1 0 0 2 1 3 0 2 0 1 0 1 1 3 1 1 0 0 1 1 1 0 1 2 2 0 0 1 2 1 3 3 1 1 4 1 0 1 1 1 0 1 2 1 0 1 1 3 0 0 2 0 3 3 0 2 0 1 6 1 0 2 2 1 2 0 1 0 1 0 0 4 0 1 0 0 3 0 2 1 1 1 1 0 1 0 2 0 1 2 2 0 1 1 1 0 2 2 0 0 1 1 2 0 2 0 2 1 1 1 0 0 0 0 0 1 0 0 2 1 0 0 0 0 1 1 0 2 0 0 0 1 2 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 2 2 2 2 0 0 0 1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 68 6 62
 130 7 123
 179 13 166
 41 3 38
 324 20 304
 60 5 55
 72 4 68
 105 7 98
 187 12 175
 57 4 53
 295 21 274
 105 9 96
 106 3 103
 171 8 163
 664 21 643
 18 1 17
 987 63 924
 30 6 24
 39 7 32
 38 5 33
 109 2 107
 9 0 9
 292 26 266
 21 4 17
 26 2 24
 40 2 38
 85 6 79
 3 0 3
 472 49 423
 0 0 0
 1 0 1
 0 0 0
 3 0 3
 0 0 0
 0 0 0
 3 0 3
 5 0 5
 1002 75 927
 0 0 0
 1 1 0
 1 0 1
 1 0 1
 2 0 2
 1255 139 1116
 0 0 0
 3 1 2
 2 1 1
 3 2 1
 98 11 87
 23698 2688 21010
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 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0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

];x = [
10 12 15 19 23 28 35 43 53 66 81 100 123 152 187 231 285 351 433 534 658 811 1000 1233 1520 1874 2310 2848 3511 4329 5337 6579 8111 10000 12328 15199 18738 23101 28480 35112 43288 53367 65793 81113 100000 123285 151991 187382 231013 284804 351119 432876 533670 657933 811131 1000000 1232847 1519911 1873817 2310130 2848036 3511192 4328761 5336699 6579332 8111308 10000000 12328467 15199111 18738174 23101297 28480359 35111917 43287613 53366992 65793322 81113083 100000000 123284674 151991108 187381742 231012970 284803587 351119173 432876128 533669923 657933225 811130831 1000000000 1232846739 1519911083 1873817423 2310129700 2848035868 3511191734 4328761281 5336699231 6579332247 8111308308 10000000000 
];
