using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    internal class C
    {
        private static void Main(string[] args)
        {
            int n = 7000000;
            bool[] prime = new bool[n + 1];
            prime = Array.ConvertAll<bool, bool>(prime, b => b = true);
            prime[0] = prime[1] = false;
            for (int i = 2; i * i <= n; ++i)
            {
                if (prime[i])
                    for (int j = 2; j <= n / i; j++)
                        if (prime[i * j])
                            prime[i * j] = false;
            }

            bool[] palim = new bool[n + 1];
            for (int i = 0; i < n; i++)
            {
                if (Reverse(i.ToString()) == i.ToString())
                    palim[i] = true;
            }

            string[] s = Console.ReadLine().Split(' ');

            float p = float.Parse(s[0]);
            float q = float.Parse(s[1]);
            float pq = p / q;
            int t = 1;
            int ppcnt = 0;
            int prcnt = 0;
            int ppi = 0;
            int res = 0;
            int ppimax = pp.Length;
            while (t < n)
            {
                if (palim[t])
                {
                    ppcnt++;
                    ppi++;
                }
                if (prime[t])
                    prcnt++;
                if (prcnt <= pq * ppcnt)
                {
                    res = t;
                }
                t++;
            }
            Console.WriteLine("{0}", res);
        }

        public static string Reverse(string s)
        {
            char[] charArray = s.ToCharArray();
            Array.Reverse(charArray);
            return new string(charArray);
        }

        static int[] pp = {1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,101,111,121,131,141,151,161,171,181,191,202,212,222,232,242,252,262,272,282,292,303,313,323,333,343,353,363,373,383,393,404,414,424,434,444,454,464,474,484,494,505,515,525,535,545,555,565,575,585,595,606,616,626,636,646,656,666,676,686,696,707,717,727,737,747,757,767,777,787,797,808,818,828,838,848,858,868,878,888,898,909,919,929,939,949,959,969,979,989,999,1001,1111,1221,1331,1441,1551,1661,1771,1881,1991,2002,2112,2222,2332,2442,2552,2662,2772,2882,2992,3003,3113,3223,3333,3443,3553,3663,3773,3883,3993,4004,4114,4224,4334,4444,4554,4664,4774,4884,4994,5005,5115,5225,5335,5445,5555,5665,5775,5885,5995,6006,6116,6226,6336,6446,6556,6666,6776,6886,6996,7007,7117,7227,7337,7447,7557,7667,7777,7887,7997,8008,8118,8228,8338,8448,8558,8668,8778,8888,8998,9009,9119,9229,9339,9449,9559,9669,9779,9889,9999,10001,10101,10201,10301,10401,10501,10601,10701,10801,10901,11011,11111,11211,11311,11411,11511,11611,11711,11811,11911,12021,12121,12221,12321,12421,12521,12621,12721,12821,12921,13031,13131,13231,13331,13431,13531,13631,13731,13831,13931,14041,14141,14241,14341,14441,14541,14641,14741,14841,14941,15051,15151,15251,15351,15451,15551,15651,15751,15851,15951,16061,16161,16261,16361,16461,16561,16661,16761,16861,16961,17071,17171,17271,17371,17471,17571,17671,17771,17871,17971,18081,18181,18281,18381,18481,18581,18681,18781,18881,18981,19091,19191,19291,19391,19491,19591,19691,19791,19891,19991,20002,20102,20202,20302,20402,20502,20602,20702,20802,20902,21012,21112,21212,21312,21412,21512,21612,21712,21812,21912,22022,22122,22222,22322,22422,22522,22622,22722,22822,22922,23032,23132,23232,23332,23432,23532,23632,23732,23832,23932,24042,24142,24242,24342,24442,24542,24642,24742,24842,24942,25052,25152,25252,25352,25452,25552,25652,25752,25852,25952,26062,26162,26262,26362,26462,26562,26662,26762,26862,26962,27072,27172,27272,27372,27472,27572,27672,27772,27872,27972,28082,28182,28282,28382,28482,28582,28682,28782,28882,28982,29092,29192,29292,29392,29492,29592,29692,29792,29892,29992,30003,30103,30203,30303,30403,30503,30603,30703,30803,30903,31013,31113,31213,31313,31413,31513,31613,31713,31813,31913,32023,32123,32223,32323,32423,32523,32623,32723,32823,32923,33033,33133,33233,33333,33433,33533,33633,33733,33833,33933,34043,34143,34243,34343,34443,34543,34643,34743,34843,34943,35053,35153,35253,35353,35453,35553,35653,35753,35853,35953,36063,36163,36263,36363,36463,36563,36663,36763,36863,36963,37073,37173,37273,37373,37473,37573,37673,37773,37873,37973,38083,38183,38283,38383,38483,38583,38683,38783,38883,38983,39093,39193,39293,39393,39493,39593,39693,39793,39893,39993,40004,40104,40204,40304,40404,40504,40604,40704,40804,40904,41014,41114,41214,41314,41414,41514,41614,41714,41814,41914,42024,42124,42224,42324,42424,42524,42624,42724,42824,42924,43034,43134,43234,43334,43434,43534,43634,43734,43834,43934,44044,44144,44244,44344,44444,44544,44644,44744,44844,44944,45054,45154,45254,45354,45454,45554,45654,45754,45854,45954,46064,46164,46264,46364,46464,46564,46664,46764,46864,46964,47074,47174,47274,47374,47474,47574,47674,47774,47874,47974,48084,48184,48284,48384,48484,48584,48684,48784,48884,48984,49094,49194,49294,49394,49494,49594,49694,49794,49894,49994,50005,50105,50205,50305,50405,50505,50605,50705,50805,50905,51015,51115,51215,51315,51415,51515,51615,51715,51815,51915,52025,52125,52225,52325,52425,52525,52625,52725,52825,52925,53035,53135,53235,53335,53435,53535,53635,53735,53835,53935,54045,54145,54245,54345,54445,54545,54645,54745,54845,54945,55055,55155,55255,55355,55455,55555,55655,55755,55855,55955,56065,56165,56265,56365,56465,56565,56665,56765,56865,56965,57075,57175,57275,57375,57475,57575,57675,57775,57875,57975,58085,58185,58285,58385,58485,58585,58685,58785,58885,58985,59095,59195,59295,59395,59495,59595,59695,59795,59895,59995,60006,60106,60206,60306,60406,60506,60606,60706,60806,60906,61016,61116,61216,61316,61416,61516,61616,61716,61816,61916,62026,62126,62226,62326,62426,62526,62626,62726,62826,62926,63036,63136,63236,63336,63436,63536,63636,63736,63836,63936,64046,64146,64246,64346,64446,64546,64646,64746,64846,64946,65056,65156,65256,65356,65456,65556,65656,65756,65856,65956,66066,66166,66266,66366,66466,66566,66666,66766,66866,66966,67076,67176,67276,67376,67476,67576,67676,67776,67876,67976,68086,68186,68286,68386,68486,68586,68686,68786,68886,68986,69096,69196,69296,69396,69496,69596,69696,69796,69896,69996,70007,70107,70207,70307,70407,70507,70607,70707,70807,70907,71017,71117,71217,71317,71417,71517,71617,71717,71817,71917,72027,72127,72227,72327,72427,72527,72627,72727,72827,72927,73037,73137,73237,73337,73437,73537,73637,73737,73837,73937,74047,74147,74247,74347,74447,74547,74647,74747,74847,74947,75057,75157,75257,75357,75457,75557,75657,75757,75857,75957,76067,76167,76267,76367,76467,76567,76667,76767,76867,76967,77077,77177,77277,77377,77477,77577,77677,77777,77877,77977,78087,78187,78287,78387,78487,78587,78687,78787,78887,78987,79097,79197,79297,79397,79497,79597,79697,79797,79897,79997,80008,80108,80208,80308,80408,80508,80608,80708,80808,80908,81018,81118,81218,81318,81418,81518,81618,81718,81818,81918,82028,82128,82228,82328,82428,82528,82628,82728,82828,82928,83038,83138,83238,83338,83438,83538,83638,83738,83838,83938,84048,84148,84248,84348,84448,84548,84648,84748,84848,84948,85058,85158,85258,85358,85458,85558,85658,85758,85858,85958,86068,86168,86268,86368,86468,86568,86668,86768,86868,86968,87078,87178,87278,87378,87478,87578,87678,87778,87878,87978,88088,88188,88288,88388,88488,88588,88688,88788,88888,88988,89098,89198,89298,89398,89498,89598,89698,89798,89898,89998,90009,90109,90209,90309,90409,90509,90609,90709,90809,90909,91019,91119,91219,91319,91419,91519,91619,91719,91819,91919,92029,92129,92229,92329,92429,92529,92629,92729,92829,92929,93039,93139,93239,93339,93439,93539,93639,93739,93839,93939,94049,94149,94249,94349,94449,94549,94649,94749,94849,94949,95059,95159,95259,95359,95459,95559,95659,95759,95859,95959,96069,96169,96269,96369,96469,96569,96669,96769,96869,96969,97079,97179,97279,97379,97479,97579,97679,97779,97879,97979,98089,98189,98289,98389,98489,98589,98689,98789,98889,98989,99099,99199,99299,99399,99499,99599,99699,99799,99899,99999,100001,101101,102201,103301,104401,105501,106601,107701,108801,109901,110011,111111,112211,113311,114411,115511,116611,117711,118811,119911,120021,121121,122221,123321,124421,125521,126621,127721,128821,129921,130031,131131,132231,133331,134431,135531,136631,137731,138831,139931,140041,141141,142241,143341,144441,145541,146641,147741,148841,149941,150051,151151,152251,153351,154451,155551,156651,157751,158851,159951,160061,161161,162261,163361,164461,165561,166661,167761,168861,169961,170071,171171,172271,173371,174471,175571,176671,177771,178871,179971,180081,181181,182281,183381,184481,185581,186681,187781,188881,189981,190091,191191,192291,193391,194491,195591,196691,197791,198891,199991,200002,201102,202202,203302,204402,205502,206602,207702,208802,209902,210012,211112,212212,213312,214412,215512,216612,217712,218812,219912,220022,221122,222222,223322,224422,225522,226622,227722,228822,229922,230032,231132,232232,233332,234432,235532,236632,237732,238832,239932,240042,241142,242242,243342,244442,245542,246642,247742,248842,249942,250052,251152,252252,253352,254452,255552,256652,257752,258852,259952,260062,261162,262262,263362,264462,265562,266662,267762,268862,269962,270072,271172,272272,273372,274472,275572,276672,277772,278872,279972,280082,281182,282282,283382,284482,285582,286682,287782,288882,289982,290092,291192,292292,293392,294492,295592,296692,297792,298892,299992,300003,301103,302203,303303,304403,305503,306603,307703,308803,309903,310013,311113,312213,313313,314413,315513,316613,317713,318813,319913,320023,321123,322223,323323,324423,325523,326623,327723,328823,329923,330033,331133,332233,333333,334433,335533,336633,337733,338833,339933,340043,341143,342243,343343,344443,345543,346643,347743,348843,349943,350053,351153,352253,353353,354453,355553,356653,357753,358853,359953,360063,361163,362263,363363,364463,365563,366663,367763,368863,369963,370073,371173,372273,373373,374473,375573,376673,377773,378873,379973,380083,381183,382283,383383,384483,385583,386683,387783,388883,389983,390093,391193,392293,393393,394493,395593,396693,397793,398893,399993,400004,401104,402204,403304,404404,405504,406604,407704,408804,409904,410014,411114,412214,413314,414414,415514,416614,417714,418814,419914,420024,421124,422224,423324,424424,425524,426624,427724,428824,429924,430034,431134,432234,433334,434434,435534,436634,437734,438834,439934,440044,441144,442244,443344,444444,445544,446644,447744,448844,449944,450054,451154,452254,453354,454454,455554,456654,457754,458854,459954,460064,461164,462264,463364,464464,465564,466664,467764,468864,469964,470074,471174,472274,473374,474474,475574,476674,477774,478874,479974,480084,481184,482284,483384,484484,485584,486684,487784,488884,489984,490094,491194,492294,493394,494494,495594,496694,497794,498894,499994,500005,501105,502205,503305,504405,505505,506605,507705,508805,509905,510015,511115,512215,513315,514415,515515,516615,517715,518815,519915,520025,521125,522225,523325,524425,525525,526625,527725,528825,529925,530035,531135,532235,533335,534435,535535,536635,537735,538835,539935,540045,541145,542245,543345,544445,545545,546645,547745,548845,549945,550055,551155,552255,553355,554455,555555,556655,557755,558855,559955,560065,561165,562265,563365,564465,565565,566665,567765,568865,569965,570075,571175,572275,573375,574475,575575,576675,577775,578875,579975,580085,581185,582285,583385,584485,585585,586685,587785,588885,589985,590095,591195,592295,593395,594495,595595,596695,597795,598895,599995,600006,601106,602206,603306,604406,605506,606606,607706,608806,609906,610016,611116,612216,613316,614416,615516,616616,617716,618816,619916,620026,621126,622226,623326,624426,625526,626626,627726,628826,629926,630036,631136,632236,633336,634436,635536,636636,637736,638836,639936,640046,641146,642246,643346,644446,645546,646646,647746,648846,649946,650056,651156,652256,653356,654456,655556,656656,657756,658856,659956,660066,661166,662266,663366,664466,665566,666666,667766,668866,669966,670076,671176,672276,673376,674476,675576,676676,677776,678876,679976,680086,681186,682286,683386,684486,685586,686686,687786,688886,689986,690096,691196,692296,693396,694496,695596,696696,697796,698896,699996,700007,701107,702207,703307,704407,705507,706607,707707,708807,709907,710017,711117,712217,713317,714417,715517,716617,717717,718817,719917,720027,721127,722227,723327,724427,725527,726627,727727,728827,729927,730037,731137,732237,733337,734437,735537,736637,737737,738837,739937,740047,741147,742247,743347,744447,745547,746647,747747,748847,749947,750057,751157,752257,753357,754457,755557,756657,757757,758857,759957,760067,761167,762267,763367,764467,765567,766667,767767,768867,769967,770077,771177,772277,773377,774477,775577,776677,777777,778877,779977,780087,781187,782287,783387,784487,785587,786687,787787,788887,789987,790097,791197,792297,793397,794497,795597,796697,797797,798897,799997,800008,801108,802208,803308,804408,805508,806608,807708,808808,809908,810018,811118,812218,813318,814418,815518,816618,817718,818818,819918,820028,821128,822228,823328,824428,825528,826628,827728,828828,829928,830038,831138,832238,833338,834438,835538,836638,837738,838838,839938,840048,841148,842248,843348,844448,845548,846648,847748,848848,849948,850058,851158,852258,853358,854458,855558,856658,857758,858858,859958,860068,861168,862268,863368,864468,865568,866668,867768,868868,869968,870078,871178,872278,873378,874478,875578,876678,877778,878878,879978,880088,881188,882288,883388,884488,885588,886688,887788,888888,889988,890098,891198,892298,893398,894498,895598,896698,897798,898898,899998,900009,901109,902209,903309,904409,905509,906609,907709,908809,909909,910019,911119,912219,913319,914419,915519,916619,917719,918819,919919,920029,921129,922229,923329,924429,925529,926629,927729,928829,929929,930039,931139,932239,933339,934439,935539,936639,937739,938839,939939,940049,941149,942249,943349,944449,945549,946649,947749,948849,949949,950059,951159,952259,953359,954459,955559,956659,957759,958859,959959,960069,961169,962269,963369,964469,965569,966669,967769,968869,969969,970079,971179,972279,973379,974479,975579,976679,977779,978879,979979,980089,981189,982289,983389,984489,985589,986689,987789,988889,989989,990099,991199,992299,993399,994499,995599,996699,997799,998899,999999,1000001,1001001,1002001,1003001,1004001,1005001,1006001,1007001,1008001,1009001,1010101,1011101,1012101,1013101,1014101,1015101,1016101,1017101,1018101,1019101,1020201,1021201,1022201,1023201,1024201,1025201,1026201,1027201,1028201,1029201,1030301,1031301,1032301,1033301,1034301,1035301,1036301,1037301,1038301,1039301,1040401,1041401,1042401,1043401,1044401,1045401,1046401,1047401,1048401,1049401,1050501,1051501,1052501,1053501,1054501,1055501,1056501,1057501,1058501,1059501,1060601,1061601,1062601,1063601,1064601,1065601,1066601,1067601,1068601,1069601,1070701,1071701,1072701,1073701,1074701,1075701,1076701,1077701,1078701,1079701,1080801,1081801,1082801,1083801,1084801,1085801,1086801,1087801,1088801,1089801,1090901,1091901,1092901,1093901,1094901,1095901,1096901,1097901,1098901,1099901,1100011,1101011,1102011,1103011,1104011,1105011,1106011,1107011,1108011,1109011,1110111,1111111,1112111,1113111,1114111,1115111,1116111,1117111,1118111,1119111,1120211,1121211,1122211,1123211,1124211,1125211,1126211,1127211,1128211,1129211,1130311,1131311,1132311,1133311,1134311,1135311,1136311,1137311,1138311,1139311,1140411,1141411,1142411,1143411,1144411,1145411,1146411,1147411,1148411,1149411,1150511,1151511,1152511,1153511,1154511,1155511,1156511,1157511,1158511,1159511,1160611,1161611,1162611,1163611,1164611,1165611,1166611,1167611,1168611,1169611,1170711,1171711,1172711,1173711,1174711,1175711,1176711,1177711,1178711,1179711,1180811,1181811,1182811,1183811,1184811,1185811,1186811,1187811,1188811,1189811,1190911,1191911,1192911,1193911,1194911,1195911,1196911,1197911,1198911,1199911,1200021,1201021,1202021,1203021,1204021,1205021,1206021,1207021,1208021,1209021,1210121,1211121,1212121,1213121,1214121,1215121,1216121,1217121,1218121,1219121,1220221,1221221,1222221,1223221,1224221,1225221,1226221,1227221,1228221,1229221,1230321,1231321,1232321,1233321,1234321,1235321,1236321,1237321,1238321,1239321,1240421,1241421,1242421,1243421,1244421,1245421,1246421,1247421,1248421,1249421,1250521,1251521,1252521,1253521,1254521,1255521,1256521,1257521,1258521,1259521,1260621,1261621,1262621,1263621,1264621,1265621,1266621,1267621,1268621,1269621,1270721,1271721,1272721,1273721,1274721,1275721,1276721,1277721,1278721,1279721,1280821,1281821,1282821,1283821,1284821,1285821,1286821,1287821,1288821,1289821,1290921,1291921,1292921,1293921,1294921,1295921,1296921,1297921,1298921,1299921,1300031,1301031,1302031,1303031,1304031,1305031,1306031,1307031,1308031,1309031,1310131,1311131,1312131,1313131,1314131,1315131,1316131,1317131,1318131,1319131,1320231,1321231,1322231,1323231,1324231,1325231,1326231,1327231,1328231,1329231,1330331,1331331,1332331,1333331,1334331,1335331,1336331,1337331,1338331,1339331,1340431,1341431,1342431,1343431,1344431,1345431,1346431,1347431,1348431,1349431,1350531,1351531,1352531,1353531,1354531,1355531,1356531,1357531,1358531,1359531,1360631,1361631,1362631,1363631,1364631,1365631,1366631,1367631,1368631,1369631,1370731,1371731,1372731,1373731,1374731,1375731,1376731,1377731,1378731,1379731,1380831,1381831,1382831,1383831,1384831,1385831,1386831,1387831,1388831,1389831,1390931,1391931,1392931,1393931,1394931,1395931,1396931,1397931,1398931,1399931,1400041,1401041,1402041,1403041,1404041,1405041,1406041,1407041,1408041,1409041,1410141,1411141,1412141,1413141,1414141,1415141,1416141,1417141,1418141,1419141,1420241,1421241,1422241,1423241,1424241,1425241,1426241,1427241,1428241,1429241,1430341,1431341,1432341,1433341,1434341,1435341,1436341,1437341,1438341,1439341,1440441,1441441,1442441,1443441,1444441,1445441,1446441,1447441,1448441,1449441,1450541,1451541,1452541,1453541,1454541,1455541,1456541,1457541,1458541,1459541,1460641,1461641,1462641,1463641,1464641,1465641,1466641,1467641,1468641,1469641,1470741,1471741,1472741,1473741,1474741,1475741,1476741,1477741,1478741,1479741,1480841,1481841,1482841,1483841,1484841,1485841,1486841,1487841,1488841,1489841,1490941,1491941,1492941,1493941,1494941,1495941,1496941,1497941,1498941,1499941,1500051,1501051,1502051,1503051,1504051,1505051,1506051,1507051,1508051,1509051,1510151,1511151,1512151,1513151,1514151,1515151,1516151,1517151,1518151,1519151,1520251,1521251,1522251,1523251,1524251,1525251,1526251,1527251,1528251,1529251,1530351,1531351,1532351,1533351,1534351,1535351,1536351,1537351,1538351,1539351,1540451,1541451,1542451,1543451,1544451,1545451,1546451,1547451,1548451,1549451,1550551,1551551,1552551,1553551,1554551,1555551,1556551,1557551,1558551,1559551,1560651,1561651,1562651,1563651,1564651,1565651,1566651,1567651,1568651,1569651,1570751,1571751,1572751,1573751,1574751,1575751,1576751,1577751,1578751,1579751,1580851,1581851,1582851,1583851,1584851,1585851,1586851,1587851,1588851,1589851,1590951,1591951,1592951,1593951,1594951,1595951,1596951,1597951,1598951,1599951,1600061,1601061,1602061,1603061,1604061,1605061,1606061,1607061,1608061,1609061,1610161,1611161,1612161,1613161,1614161,1615161,1616161,1617161,1618161,1619161,1620261,1621261,1622261,1623261,1624261,1625261,1626261,1627261,1628261,1629261,1630361,1631361,1632361,1633361,1634361,1635361,1636361,1637361,1638361,1639361,1640461,1641461,1642461,1643461,1644461,1645461,1646461,1647461,1648461,1649461,1650561,1651561,1652561,1653561,1654561,1655561,1656561,1657561,1658561,1659561,1660661,1661661,1662661,1663661,1664661,1665661,1666661,1667661,1668661,1669661,1670761,1671761,1672761,1673761,1674761,1675761,1676761,1677761,1678761,1679761,1680861,1681861,1682861,1683861,1684861,1685861,1686861,1687861,1688861,1689861,1690961,1691961,1692961,1693961,1694961,1695961,1696961,1697961,1698961,1699961,1700071,1701071,1702071,1703071,1704071,1705071,1706071,1707071,1708071,1709071,1710171,1711171,1712171,1713171,1714171,1715171,1716171,1717171,1718171,1719171,1720271,1721271,1722271,1723271,1724271,1725271,1726271,1727271,1728271,1729271,1730371,1731371,1732371,1733371,1734371,1735371,1736371,1737371,1738371,1739371,1740471,1741471,1742471,1743471,1744471,1745471,1746471,1747471,1748471,1749471,1750571,1751571,1752571,1753571,1754571,1755571,1756571,1757571,1758571,1759571,1760671,1761671,1762671,1763671,1764671,1765671,1766671,1767671,1768671,1769671,1770771,1771771,1772771,1773771,1774771,1775771,1776771,1777771,1778771,1779771,1780871,1781871,1782871,1783871,1784871,1785871,1786871,1787871,1788871,1789871,1790971,1791971,1792971,1793971,1794971,1795971,1796971,1797971,1798971,1799971,1800081,1801081,1802081,1803081,1804081,1805081,1806081,1807081,1808081,1809081,1810181,1811181,1812181,1813181,1814181,1815181,1816181,1817181,1818181,1819181,1820281,1821281,1822281,1823281,1824281,1825281,1826281,1827281,1828281,1829281,1830381,1831381,1832381,1833381,1834381,1835381,1836381,1837381,1838381,1839381,1840481,1841481,1842481,1843481,1844481,1845481,1846481,1847481,1848481,1849481,1850581,1851581,1852581,1853581,1854581,1855581,1856581,1857581,1858581,1859581,1860681,1861681,1862681,1863681,1864681,1865681,1866681,1867681,1868681,1869681,1870781,1871781,1872781,1873781,1874781,1875781,1876781,1877781,1878781,1879781,1880881,1881881,1882881,1883881,1884881,1885881,1886881,1887881,1888881,1889881,1890981,1891981,1892981,1893981,1894981,1895981,1896981,1897981,1898981,1899981,1900091,1901091,1902091,1903091,1904091,1905091,1906091,1907091,1908091,1909091,1910191,1911191,1912191,1913191,1914191,1915191,1916191,1917191,1918191,1919191,1920291,1921291,1922291,1923291,1924291,1925291,1926291,1927291,1928291,1929291,1930391,1931391,1932391,1933391,1934391,1935391,1936391,1937391,1938391,1939391,1940491,1941491,1942491,1943491,1944491,1945491,1946491,1947491,1948491,1949491,1950591,1951591,1952591,1953591,1954591,1955591,1956591,1957591,1958591,1959591,1960691,1961691,1962691,1963691,1964691,1965691,1966691,1967691,1968691,1969691,1970791,1971791,1972791,1973791,1974791,1975791,1976791,1977791,1978791,1979791,1980891,1981891,1982891,1983891,1984891,1985891,1986891,1987891,1988891,1989891,1990991,1991991,1992991,1993991,1994991,1995991,1996991,1997991,1998991,1999991,2000002,2001002,2002002,2003002,2004002,2005002,2006002,2007002,2008002,2009002,2010102,2011102,2012102,2013102,2014102,2015102,2016102,2017102,2018102,2019102,2020202,2021202,2022202,2023202,2024202,2025202,2026202,2027202,2028202,2029202,2030302,2031302,2032302,2033302,2034302,2035302,2036302,2037302,2038302,2039302,2040402,2041402,2042402,2043402,2044402,2045402,2046402,2047402,2048402,2049402,2050502,2051502,2052502,2053502,2054502,2055502,2056502,2057502,2058502,2059502,2060602,2061602,2062602,2063602,2064602,2065602,2066602,2067602,2068602,2069602,2070702,2071702,2072702,2073702,2074702,2075702,2076702,2077702,2078702,2079702,2080802,2081802,2082802,2083802,2084802,2085802,2086802,2087802,2088802,2089802,2090902,2091902,2092902,2093902,2094902,2095902,2096902,2097902,2098902,2099902,2100012,2101012,2102012,2103012,2104012,2105012,2106012,2107012,2108012,2109012,2110112,2111112,2112112,2113112,2114112,2115112,2116112,2117112,2118112,2119112,2120212,2121212,2122212,2123212,2124212,2125212,2126212,2127212,2128212,2129212,2130312,2131312,2132312,2133312,2134312,2135312,2136312,2137312,2138312,2139312,2140412,2141412,2142412,2143412,2144412,2145412,2146412,2147412,2148412,2149412,2150512,2151512,2152512,2153512,2154512,2155512,2156512,2157512,2158512,2159512,2160612,2161612,2162612,2163612,2164612,2165612,2166612,2167612,2168612,2169612,2170712,2171712,2172712,2173712,2174712,2175712,2176712,2177712,2178712,2179712,2180812,2181812,2182812,2183812,2184812,2185812,2186812,2187812,2188812,2189812,2190912,2191912,2192912,2193912,2194912,2195912,2196912,2197912,2198912,2199912,2200022,2201022,2202022,2203022,2204022,2205022,2206022,2207022,2208022,2209022,2210122,2211122,2212122,2213122,2214122,2215122,2216122,2217122,2218122,2219122,2220222,2221222,2222222,2223222,2224222,2225222,2226222,2227222,2228222,2229222,2230322,2231322,2232322,2233322,2234322,2235322,2236322,2237322,2238322,2239322,2240422,2241422,2242422,2243422,2244422,2245422,2246422,2247422,2248422,2249422,2250522,2251522,2252522,2253522,2254522,2255522,2256522,2257522,2258522,2259522,2260622,2261622,2262622,2263622,2264622,2265622,2266622,2267622,2268622,2269622,2270722,2271722,2272722,2273722,2274722,2275722,2276722,2277722,2278722,2279722,2280822,2281822,2282822,2283822,2284822,2285822,2286822,2287822,2288822,2289822,2290922,2291922,2292922,2293922,2294922,2295922,2296922,2297922,2298922,2299922,2300032,2301032,2302032,2303032,2304032,2305032,2306032,2307032,2308032,2309032,2310132,2311132,2312132,2313132,2314132,2315132,2316132,2317132,2318132,2319132,2320232,2321232,2322232,2323232,2324232,2325232,2326232,2327232,2328232,2329232,2330332,2331332,2332332,2333332,2334332,2335332,2336332,2337332,2338332,2339332,2340432,2341432,2342432,2343432,2344432,2345432,2346432,2347432,2348432,2349432,2350532,2351532,2352532,2353532,2354532,2355532,2356532,2357532,2358532,2359532,2360632,2361632,2362632,2363632,2364632,2365632,2366632,2367632,2368632,2369632,2370732,2371732,2372732,2373732,2374732,2375732,2376732,2377732,2378732,2379732,2380832,2381832,2382832,2383832,2384832,2385832,2386832,2387832,2388832,2389832,2390932,2391932,2392932,2393932,2394932,2395932,2396932,2397932,2398932,2399932,2400042,2401042,2402042,2403042,2404042,2405042,2406042,2407042,2408042,2409042,2410142,2411142,2412142,2413142,2414142,2415142,2416142,2417142,2418142,2419142,2420242,2421242,2422242,2423242,2424242,2425242,2426242,2427242,2428242,2429242,2430342,2431342,2432342,2433342,2434342,2435342,2436342,2437342,2438342,2439342,2440442,2441442,2442442,2443442,2444442,2445442,2446442,2447442,2448442,2449442,2450542,2451542,2452542,2453542,2454542,2455542,2456542,2457542,2458542,2459542,2460642,2461642,2462642,2463642,2464642,2465642,2466642,2467642,2468642,2469642,2470742,2471742,2472742,2473742,2474742,2475742,2476742,2477742,2478742,2479742,2480842,2481842,2482842,2483842,2484842,2485842,2486842,2487842,2488842,2489842,2490942,2491942,2492942,2493942,2494942,2495942,2496942,2497942,2498942,2499942,2500052,2501052,2502052,2503052,2504052,2505052,2506052,2507052,2508052,2509052,2510152,2511152,2512152,2513152,2514152,2515152,2516152,2517152,2518152,2519152,2520252,2521252,2522252,2523252,2524252,2525252,2526252,2527252,2528252,2529252,2530352,2531352,2532352,2533352,2534352,2535352,2536352,2537352,2538352,2539352,2540452,2541452,2542452,2543452,2544452,2545452,2546452,2547452,2548452,2549452,2550552,2551552,2552552,2553552,2554552,2555552,2556552,2557552,2558552,2559552,2560652,2561652,2562652,2563652,2564652,2565652,2566652,2567652,2568652,2569652,2570752,2571752,2572752,2573752,2574752,2575752,2576752,2577752,2578752,2579752,2580852,2581852,2582852,2583852,2584852,2585852,2586852,2587852,2588852,2589852,2590952,2591952,2592952,2593952,2594952,2595952,2596952,2597952,2598952,2599952,2600062,2601062,2602062,2603062,2604062,2605062,2606062,2607062,2608062,2609062,2610162,2611162,2612162,2613162,2614162,2615162,2616162,2617162,2618162,2619162,2620262,2621262,2622262,2623262,2624262,2625262,2626262,2627262,2628262,2629262,2630362,2631362,2632362,2633362,2634362,2635362,2636362,2637362,2638362,2639362,2640462,2641462,2642462,2643462,2644462,2645462,2646462,2647462,2648462,2649462,2650562,2651562,2652562,2653562,2654562,2655562,2656562,2657562,2658562,2659562,2660662,2661662,2662662,2663662,2664662,2665662,2666662,2667662,2668662,2669662,2670762,2671762,2672762,2673762,2674762,2675762,2676762,2677762,2678762,2679762,2680862,2681862,2682862,2683862,2684862,2685862,2686862,2687862,2688862,2689862,2690962,2691962,2692962,2693962,2694962,2695962,2696962,2697962,2698962,2699962,2700072,2701072,2702072,2703072,2704072,2705072,2706072,2707072,2708072,2709072,2710172,2711172,2712172,2713172,2714172,2715172,2716172,2717172,2718172,2719172,2720272,2721272,2722272,2723272,2724272,2725272,2726272,2727272,2728272,2729272,2730372,2731372,2732372,2733372,2734372,2735372,2736372,2737372,2738372,2739372,2740472,2741472,2742472,2743472,2744472,2745472,2746472,2747472,2748472,2749472,2750572,2751572,2752572,2753572,2754572,2755572,2756572,2757572,2758572,2759572,2760672,2761672,2762672,2763672,2764672,2765672,2766672,2767672,2768672,2769672,2770772,2771772,2772772,2773772,2774772,2775772,2776772,2777772,2778772,2779772,2780872,2781872,2782872,2783872,2784872,2785872,2786872,2787872,2788872,2789872,2790972,2791972,2792972,2793972,2794972,2795972,2796972,2797972,2798972,2799972,2800082,2801082,2802082,2803082,2804082,2805082,2806082,2807082,2808082,2809082,2810182,2811182,2812182,2813182,2814182,2815182,2816182,2817182,2818182,2819182,2820282,2821282,2822282,2823282,2824282,2825282,2826282,2827282,2828282,2829282,2830382,2831382,2832382,2833382,2834382,2835382,2836382,2837382,2838382,2839382,2840482,2841482,2842482,2843482,2844482,2845482,2846482,2847482,2848482,2849482,2850582,2851582,2852582,2853582,2854582,2855582,2856582,2857582,2858582,2859582,2860682,2861682,2862682,2863682,2864682,2865682,2866682,2867682,2868682,2869682,2870782,2871782,2872782,2873782,2874782,2875782,2876782,2877782,2878782,2879782,2880882,2881882,2882882,2883882,2884882,2885882,2886882,2887882,2888882,2889882,2890982,2891982,2892982,2893982,2894982,2895982,2896982,2897982,2898982,2899982,2900092,2901092,2902092,2903092,2904092,2905092,2906092,2907092,2908092,2909092,2910192,2911192,2912192,2913192,2914192,2915192,2916192,2917192,2918192,2919192,2920292,2921292,2922292,2923292,2924292,2925292,2926292,2927292,2928292,2929292,2930392,2931392,2932392,2933392,2934392,2935392,2936392,2937392,2938392,2939392,2940492,2941492,2942492,2943492,2944492,2945492,2946492,2947492,2948492,2949492,2950592,2951592,2952592,2953592,2954592,2955592,2956592,2957592,2958592,2959592,2960692,2961692,2962692,2963692,2964692,2965692,2966692,2967692,2968692,2969692,2970792,2971792,2972792,2973792,2974792,2975792,2976792,2977792,2978792,2979792,2980892,2981892,2982892,2983892,2984892,2985892,2986892,2987892,2988892,2989892,2990992,2991992,2992992,2993992,2994992,2995992,2996992,2997992,2998992,2999992,3000003,3001003,3002003,3003003,3004003,3005003,3006003,3007003,3008003,3009003,3010103,3011103,3012103,3013103,3014103,3015103,3016103,3017103,3018103,3019103,3020203,3021203,3022203,3023203,3024203,3025203,3026203,3027203,3028203,3029203,3030303,3031303,3032303,3033303,3034303,3035303,3036303,3037303,3038303,3039303,3040403,3041403,3042403,3043403,3044403,3045403,3046403,3047403,3048403,3049403,3050503,3051503,3052503,3053503,3054503,3055503,3056503,3057503,3058503,3059503,3060603,3061603,3062603,3063603,3064603,3065603,3066603,3067603,3068603,3069603,3070703,3071703,3072703,3073703,3074703,3075703,3076703,3077703,3078703,3079703,3080803,3081803,3082803,3083803,3084803,3085803,3086803,3087803,3088803,3089803,3090903,3091903,3092903,3093903,3094903,3095903,3096903,3097903,3098903,3099903,3100013,3101013,3102013,3103013,3104013,3105013,3106013,3107013,3108013,3109013,3110113,3111113,3112113,3113113,3114113,3115113,3116113,3117113,3118113,3119113,3120213,3121213,3122213,3123213,3124213,3125213,3126213,3127213,3128213,3129213,3130313,3131313,3132313,3133313,3134313,3135313,3136313,3137313,3138313,3139313,3140413,3141413,3142413,3143413,3144413,3145413,3146413,3147413,3148413,3149413,3150513,3151513,3152513,3153513,3154513,3155513,3156513,3157513,3158513,3159513,3160613,3161613,3162613,3163613,3164613,3165613,3166613,3167613,3168613,3169613,3170713,3171713,3172713,3173713,3174713,3175713,3176713,3177713,3178713,3179713,3180813,3181813,3182813,3183813,3184813,3185813,3186813,3187813,3188813,3189813,3190913,3191913,3192913,3193913,3194913,3195913,3196913,3197913,3198913,3199913,3200023,3201023,3202023,3203023,3204023,3205023,3206023,3207023,3208023,3209023,3210123,3211123,3212123,3213123,3214123,3215123,3216123,3217123,3218123,3219123,3220223,3221223,3222223,3223223,3224223,3225223,3226223,3227223,3228223,3229223,3230323,3231323,3232323,3233323,3234323,3235323,3236323,3237323,3238323,3239323,3240423,3241423,3242423,3243423,3244423,3245423,3246423,3247423,3248423,3249423,3250523,3251523,3252523,3253523,3254523,3255523,3256523,3257523,3258523,3259523,3260623,3261623,3262623,3263623,3264623,3265623,3266623,3267623,3268623,3269623,3270723,3271723,3272723,3273723,3274723,3275723,3276723,3277723,3278723,3279723,3280823,3281823,3282823,3283823,3284823,3285823,3286823,3287823,3288823,3289823,3290923,3291923,3292923,3293923,3294923,3295923,3296923,3297923,3298923,3299923,3300033,3301033,3302033,3303033,3304033,3305033,3306033,3307033,3308033,3309033,3310133,3311133,3312133,3313133,3314133,3315133,3316133,3317133,3318133,3319133,3320233,3321233,3322233,3323233,3324233,3325233,3326233,3327233,3328233,3329233,3330333,3331333,3332333,3333333,3334333,3335333,3336333,3337333,3338333,3339333,3340433,3341433,3342433,3343433,3344433,3345433,3346433,3347433,3348433,3349433,3350533,3351533,3352533,3353533,3354533,3355533,3356533,3357533,3358533,3359533,3360633,3361633,3362633,3363633,3364633,3365633,3366633,3367633,3368633,3369633,3370733,3371733,3372733,3373733,3374733,3375733,3376733,3377733,3378733,3379733,3380833,3381833,3382833,3383833,3384833,3385833,3386833,3387833,3388833,3389833,3390933,3391933,3392933,3393933,3394933,3395933,3396933,3397933,3398933,3399933,3400043,3401043,3402043,3403043,3404043,3405043,3406043,3407043,3408043,3409043,3410143,3411143,3412143,3413143,3414143,3415143,3416143,3417143,3418143,3419143,3420243,3421243,3422243,3423243,3424243,3425243,3426243,3427243,3428243,3429243,3430343,3431343,3432343,3433343,3434343,3435343,3436343,3437343,3438343,3439343,3440443,3441443,3442443,3443443,3444443,3445443,3446443,3447443,3448443,3449443,3450543,3451543,3452543,3453543,3454543,3455543,3456543,3457543,3458543,3459543,3460643,3461643,3462643,3463643,3464643,3465643,3466643,3467643,3468643,3469643,3470743,3471743,3472743,3473743,3474743,3475743,3476743,3477743,3478743,3479743,3480843,3481843,3482843,3483843,3484843,3485843,3486843,3487843,3488843,3489843,3490943,3491943,3492943,3493943,3494943,3495943,3496943,3497943,3498943,3499943,3500053,3501053,3502053,3503053,3504053,3505053,3506053,3507053,3508053,3509053,3510153,3511153,3512153,3513153,3514153,3515153,3516153,3517153,3518153,3519153,3520253,3521253,3522253,3523253,3524253,3525253,3526253,3527253,3528253,3529253,3530353,3531353,3532353,3533353,3534353,3535353,3536353,3537353,3538353,3539353,3540453,3541453,3542453,3543453,3544453,3545453,3546453,3547453,3548453,3549453,3550553,3551553,3552553,3553553,3554553,3555553,3556553,3557553,3558553,3559553,3560653,3561653,3562653,3563653,3564653,3565653,3566653,3567653,3568653,3569653,3570753,3571753,3572753,3573753,3574753,3575753,3576753,3577753,3578753,3579753,3580853,3581853,3582853,3583853,3584853,3585853,3586853,3587853,3588853,3589853,3590953,3591953,3592953,3593953,3594953,3595953,3596953,3597953,3598953,3599953,3600063,3601063,3602063,3603063,3604063,3605063,3606063,3607063,3608063,3609063,3610163,3611163,3612163,3613163,3614163,3615163,3616163,3617163,3618163,3619163,3620263,3621263,3622263,3623263,3624263,3625263,3626263,3627263,3628263,3629263,3630363,3631363,3632363,3633363,3634363,3635363,3636363,3637363,3638363,3639363,3640463,3641463,3642463,3643463,3644463,3645463,3646463,3647463,3648463,3649463,3650563,3651563,3652563,3653563,3654563,3655563,3656563,3657563,3658563,3659563,3660663,3661663,3662663,3663663,3664663,3665663,3666663,3667663,3668663,3669663,3670763,3671763,3672763,3673763,3674763,3675763,3676763,3677763,3678763,3679763,3680863,3681863,3682863,3683863,3684863,3685863,3686863,3687863,3688863,3689863,3690963,3691963,3692963,3693963,3694963,3695963,3696963,3697963,3698963,3699963,3700073,3701073,3702073,3703073,3704073,3705073,3706073,3707073,3708073,3709073,3710173,3711173,3712173,3713173,3714173,3715173,3716173,3717173,3718173,3719173,3720273,3721273,3722273,3723273,3724273,3725273,3726273,3727273,3728273,3729273,3730373,3731373,3732373,3733373,3734373,3735373,3736373,3737373,3738373,3739373,3740473,3741473,3742473,3743473,3744473,3745473,3746473,3747473,3748473,3749473,3750573,3751573,3752573,3753573,3754573,3755573,3756573,3757573,3758573,3759573,3760673,3761673,3762673,3763673,3764673,3765673,3766673,3767673,3768673,3769673,3770773,3771773,3772773,3773773,3774773,3775773,3776773,3777773,3778773,3779773,3780873,3781873,3782873,3783873,3784873,3785873,3786873,3787873,3788873,3789873,3790973,3791973,3792973,3793973,3794973,3795973,3796973,3797973,3798973,3799973,3800083,3801083,3802083,3803083,3804083,3805083,3806083,3807083,3808083,3809083,3810183,3811183,3812183,3813183,3814183,3815183,3816183,3817183,3818183,3819183,3820283,3821283,3822283,3823283,3824283,3825283,3826283,3827283,3828283,3829283,3830383,3831383,3832383,3833383,3834383,3835383,3836383,3837383,3838383,3839383,3840483,3841483,3842483,3843483,3844483,3845483,3846483,3847483,3848483,3849483,3850583,3851583,3852583,3853583,3854583,3855583,3856583,3857583,3858583,3859583,3860683,3861683,3862683,3863683,3864683,3865683,3866683,3867683,3868683,3869683,3870783,3871783,3872783,3873783,3874783,3875783,3876783,3877783,3878783,3879783,3880883,3881883,3882883,3883883,3884883,3885883,3886883,3887883,3888883,3889883,3890983,3891983,3892983,3893983,3894983,3895983,3896983,3897983,3898983,3899983,3900093,3901093,3902093,3903093,3904093,3905093,3906093,3907093,3908093,3909093,3910193,3911193,3912193,3913193,3914193,3915193,3916193,3917193,3918193,3919193,3920293,3921293,3922293,3923293,3924293,3925293,3926293,3927293,3928293,3929293,3930393,3931393,3932393,3933393,3934393,3935393,3936393,3937393,3938393,3939393,3940493,3941493,3942493,3943493,3944493,3945493,3946493,3947493,3948493,3949493,3950593,3951593,3952593,3953593,3954593,3955593,3956593,3957593,3958593,3959593,3960693,3961693,3962693,3963693,3964693,3965693,3966693,3967693,3968693,3969693,3970793,3971793,3972793,3973793,3974793,3975793,3976793,3977793,3978793,3979793,3980893,3981893,3982893,3983893,3984893,3985893,3986893,3987893,3988893,3989893,3990993,3991993,3992993,3993993,3994993,3995993,3996993,3997993,3998993,3999993,4000004,4001004,4002004,4003004,4004004,4005004,4006004,4007004,4008004,4009004,4010104,4011104,4012104,4013104,4014104,4015104,4016104,4017104,4018104,4019104,4020204,4021204,4022204,4023204,4024204,4025204,4026204,4027204,4028204,4029204,4030304,4031304,4032304,4033304,4034304,4035304,4036304,4037304,4038304,4039304,4040404,4041404,4042404,4043404,4044404,4045404,4046404,4047404,4048404,4049404,4050504,4051504,4052504,4053504,4054504,4055504,4056504,4057504,4058504,4059504,4060604,4061604,4062604,4063604,4064604,4065604,4066604,4067604,4068604,4069604,4070704,4071704,4072704,4073704,4074704,4075704,4076704,4077704,4078704,4079704,4080804,4081804,4082804,4083804,4084804,4085804,4086804,4087804,4088804,4089804,4090904,4091904,4092904,4093904,4094904,4095904,4096904,4097904,4098904,4099904,4100014,4101014,4102014,4103014,4104014,4105014,4106014,4107014,4108014,4109014,4110114,4111114,4112114,4113114,4114114,4115114,4116114,4117114,4118114,4119114,4120214,4121214,4122214,4123214,4124214,4125214,4126214,4127214,4128214,4129214,4130314,4131314,4132314,4133314,4134314,4135314,4136314,4137314,4138314,4139314,4140414,4141414,4142414,4143414,4144414,4145414,4146414,4147414,4148414,4149414,4150514,4151514,4152514,4153514,4154514,4155514,4156514,4157514,4158514,4159514,4160614,4161614,4162614,4163614,4164614,4165614,4166614,4167614,4168614,4169614,4170714,4171714,4172714,4173714,4174714,4175714,4176714,4177714,4178714,4179714,4180814,4181814,4182814,4183814,4184814,4185814,4186814,4187814,4188814,4189814,4190914,4191914,4192914,4193914,4194914,4195914,4196914,4197914,4198914,4199914,4200024,4201024,4202024,4203024,4204024,4205024,4206024,4207024,4208024,4209024,4210124,4211124,4212124,4213124,4214124,4215124,4216124,4217124,4218124,4219124,4220224,4221224,4222224,4223224,4224224,4225224,4226224,4227224,4228224,4229224,4230324,4231324,4232324,4233324,4234324,4235324,4236324,4237324,4238324,4239324,4240424,4241424,4242424,4243424,4244424,4245424,4246424,4247424,4248424,4249424,4250524,4251524,4252524,4253524,4254524,4255524,4256524,4257524,4258524,4259524,4260624,4261624,4262624,4263624,4264624,4265624,4266624,4267624,4268624,4269624,4270724,4271724,4272724,4273724,4274724,4275724,4276724,4277724,4278724,4279724,4280824,4281824,4282824,4283824,4284824,4285824,4286824,4287824,4288824,4289824,4290924,4291924,4292924,4293924,4294924,4295924,4296924,4297924,4298924,4299924,4300034,4301034,4302034,4303034,4304034,4305034,4306034,4307034,4308034,4309034,4310134,4311134,4312134,4313134,4314134,4315134,4316134,4317134,4318134,4319134,4320234,4321234,4322234,4323234,4324234,4325234,4326234,4327234,4328234,4329234,4330334,4331334,4332334,4333334,4334334,4335334,4336334,4337334,4338334,4339334,4340434,4341434,4342434,4343434,4344434,4345434,4346434,4347434,4348434,4349434,4350534,4351534,4352534,4353534,4354534,4355534,4356534,4357534,4358534,4359534,4360634,4361634,4362634,4363634,4364634,4365634,4366634,4367634,4368634,4369634,4370734,4371734,4372734,4373734,4374734,4375734,4376734,4377734,4378734,4379734,4380834,4381834,4382834,4383834,4384834,4385834,4386834,4387834,4388834,4389834,4390934,4391934,4392934,4393934,4394934,4395934,4396934,4397934,4398934,4399934,4400044,4401044,4402044,4403044,4404044,4405044,4406044,4407044,4408044,4409044,4410144,4411144,4412144,4413144,4414144,4415144,4416144,4417144,4418144,4419144,4420244,4421244,4422244,4423244,4424244,4425244,4426244,4427244,4428244,4429244,4430344,4431344,4432344,4433344,4434344,4435344,4436344,4437344,4438344,4439344,4440444,4441444,4442444,4443444,4444444,4445444,4446444,4447444,4448444,4449444,4450544,4451544,4452544,4453544,4454544,4455544,4456544,4457544,4458544,4459544,4460644,4461644,4462644,4463644,4464644,4465644,4466644,4467644,4468644,4469644,4470744,4471744,4472744,4473744,4474744,4475744,4476744,4477744,4478744,4479744,4480844,4481844,4482844,4483844,4484844,4485844,4486844,4487844,4488844,4489844,4490944,4491944,4492944,4493944,4494944,4495944,4496944,4497944,4498944,4499944,4500054,4501054,4502054,4503054,4504054,4505054,4506054,4507054,4508054,4509054,4510154,4511154,4512154,4513154,4514154,4515154,4516154,4517154,4518154,4519154,4520254,4521254,4522254,4523254,4524254,4525254,4526254,4527254,4528254,4529254,4530354,4531354,4532354,4533354,4534354,4535354,4536354,4537354,4538354,4539354,4540454,4541454,4542454,4543454,4544454,4545454,4546454,4547454,4548454,4549454,4550554,4551554,4552554,4553554,4554554,4555554,4556554,4557554,4558554,4559554,4560654,4561654,4562654,4563654,4564654,4565654,4566654,4567654,4568654,4569654,4570754,4571754,4572754,4573754,4574754,4575754,4576754,4577754,4578754,4579754,4580854,4581854,4582854,4583854,4584854,4585854,4586854,4587854,4588854,4589854,4590954,4591954,4592954,4593954,4594954,4595954,4596954,4597954,4598954,4599954,4600064,4601064,4602064,4603064,4604064,4605064,4606064,4607064,4608064,4609064,4610164,4611164,4612164,4613164,4614164,4615164,4616164,4617164,4618164,4619164,4620264,4621264,4622264,4623264,4624264,4625264,4626264,4627264,4628264,4629264,4630364,4631364,4632364,4633364,4634364,4635364,4636364,4637364,4638364,4639364,4640464,4641464,4642464,4643464,4644464,4645464,4646464,4647464,4648464,4649464,4650564,4651564,4652564,4653564,4654564,4655564,4656564,4657564,4658564,4659564,4660664,4661664,4662664,4663664,4664664,4665664,4666664,4667664,4668664,4669664,4670764,4671764,4672764,4673764,4674764,4675764,4676764,4677764,4678764,4679764,4680864,4681864,4682864,4683864,4684864,4685864,4686864,4687864,4688864,4689864,4690964,4691964,4692964,4693964,4694964,4695964,4696964,4697964,4698964,4699964,4700074,4701074,4702074,4703074,4704074,4705074,4706074,4707074,4708074,4709074,4710174,4711174,4712174,4713174,4714174,4715174,4716174,4717174,4718174,4719174,4720274,4721274,4722274,4723274,4724274,4725274,4726274,4727274,4728274,4729274,4730374,4731374,4732374,4733374,4734374,4735374,4736374,4737374,4738374,4739374,4740474,4741474,4742474,4743474,4744474,4745474,4746474,4747474,4748474,4749474,4750574,4751574,4752574,4753574,4754574,4755574,4756574,4757574,4758574,4759574,4760674,4761674,4762674,4763674,4764674,4765674,4766674,4767674,4768674,4769674,4770774,4771774,4772774,4773774,4774774,4775774,4776774,4777774,4778774,4779774,4780874,4781874,4782874,4783874,4784874,4785874,4786874,4787874,4788874,4789874,4790974,4791974,4792974,4793974,4794974,4795974,4796974,4797974,4798974,4799974,4800084,4801084,4802084,4803084,4804084,4805084,4806084,4807084,4808084,4809084,4810184,4811184,4812184,4813184,4814184,4815184,4816184,4817184,4818184,4819184,4820284,4821284,4822284,4823284,4824284,4825284,4826284,4827284,4828284,4829284,4830384,4831384,4832384,4833384,4834384,4835384,4836384,4837384,4838384,4839384,4840484,4841484,4842484,4843484,4844484,4845484,4846484,4847484,4848484,4849484,4850584,4851584,4852584,4853584,4854584,4855584,4856584,4857584,4858584,4859584,4860684,4861684,4862684,4863684,4864684,4865684,4866684,4867684,4868684,4869684,4870784,4871784,4872784,4873784,4874784,4875784,4876784,4877784,4878784,4879784,4880884,4881884,4882884,4883884,4884884,4885884,4886884,4887884,4888884,4889884,4890984,4891984,4892984,4893984,4894984,4895984,4896984,4897984,4898984,4899984,4900094,4901094,4902094,4903094,4904094,4905094,4906094,4907094,4908094,4909094,4910194,4911194,4912194,4913194,4914194,4915194,4916194,4917194,4918194,4919194,4920294,4921294,4922294,4923294,4924294,4925294,4926294,4927294,4928294,4929294,4930394,4931394,4932394,4933394,4934394,4935394,4936394,4937394,4938394,4939394,4940494,4941494,4942494,4943494,4944494,4945494,4946494,4947494,4948494,4949494,4950594,4951594,4952594,4953594,4954594,4955594,4956594,4957594,4958594,4959594,4960694,4961694,4962694,4963694,4964694,4965694,4966694,4967694,4968694,4969694,4970794,4971794,4972794,4973794,4974794,4975794,4976794,4977794,4978794,4979794,4980894,4981894,4982894,4983894,4984894,4985894,4986894,4987894,4988894,4989894,4990994,4991994,4992994,4993994,4994994,4995994,4996994,4997994,4998994,4999994,5000005,5001005,5002005,5003005,5004005,5005005,5006005,5007005,5008005,5009005,5010105,5011105,5012105,5013105,5014105,5015105,5016105,5017105,5018105,5019105,5020205,5021205,5022205,5023205,5024205,5025205,5026205,5027205,5028205,5029205,5030305,5031305,5032305,5033305,5034305,5035305,5036305,5037305,5038305,5039305,5040405,5041405,5042405,5043405,5044405,5045405,5046405,5047405,5048405,5049405,5050505,5051505,5052505,5053505,5054505,5055505,5056505,5057505,5058505,5059505,5060605,5061605,5062605,5063605,5064605,5065605,5066605,5067605,5068605,5069605,5070705,5071705,5072705,5073705,5074705,5075705,5076705,5077705,5078705,5079705,5080805,5081805,5082805,5083805,5084805,5085805,5086805,5087805,5088805,5089805,5090905,5091905,5092905,5093905,5094905,5095905,5096905,5097905,5098905,5099905,5100015,5101015,5102015,5103015,5104015,5105015,5106015,5107015,5108015,5109015,5110115,5111115,5112115,5113115,5114115,5115115,5116115,5117115,5118115,5119115,5120215,5121215,5122215,5123215,5124215,5125215,5126215,5127215,5128215,5129215,5130315,5131315,5132315,5133315,5134315,5135315,5136315,5137315,5138315,5139315,5140415,5141415,5142415,5143415,5144415,5145415,5146415,5147415,5148415,5149415,5150515,5151515,5152515,5153515,5154515,5155515,5156515,5157515,5158515,5159515,5160615,5161615,5162615,5163615,5164615,5165615,5166615,5167615,5168615,5169615,5170715,5171715,5172715,5173715,5174715,5175715,5176715,5177715,5178715,5179715,5180815,5181815,5182815,5183815,5184815,5185815,5186815,5187815,5188815,5189815,5190915,5191915,5192915,5193915,5194915,5195915,5196915,5197915,5198915,5199915,5200025,5201025,5202025,5203025,5204025,5205025,5206025,5207025,5208025,5209025,5210125,5211125,5212125,5213125,5214125,5215125,5216125,5217125,5218125,5219125,5220225,5221225,5222225,5223225,5224225,5225225,5226225,5227225,5228225,5229225,5230325,5231325,5232325,5233325,5234325,5235325,5236325,5237325,5238325,5239325,5240425,5241425,5242425,5243425,5244425,5245425,5246425,5247425,5248425,5249425,5250525,5251525,5252525,5253525,5254525,5255525,5256525,5257525,5258525,5259525,5260625,5261625,5262625,5263625,5264625,5265625,5266625,5267625,5268625,5269625,5270725,5271725,5272725,5273725,5274725,5275725,5276725,5277725,5278725,5279725,5280825,5281825,5282825,5283825,5284825,5285825,5286825,5287825,5288825,5289825,5290925,5291925,5292925,5293925,5294925,5295925,5296925,5297925,5298925,5299925,5300035,5301035,5302035,5303035,5304035,5305035,5306035,5307035,5308035,5309035,5310135,5311135,5312135,5313135,5314135,5315135,5316135,5317135,5318135,5319135,5320235,5321235,5322235,5323235,5324235,5325235,5326235,5327235,5328235,5329235,5330335,5331335,5332335,5333335,5334335,5335335,5336335,5337335,5338335,5339335,5340435,5341435,5342435,5343435,5344435,5345435,5346435,5347435,5348435,5349435,5350535,5351535,5352535,5353535,5354535,5355535,5356535,5357535,5358535,5359535,5360635,5361635,5362635,5363635,5364635,5365635,5366635,5367635,5368635,5369635,5370735,5371735,5372735,5373735,5374735,5375735,5376735,5377735,5378735,5379735,5380835,5381835,5382835,5383835,5384835,5385835,5386835,5387835,5388835,5389835,5390935,5391935,5392935,5393935,5394935,5395935,5396935,5397935,5398935,5399935,5400045,5401045,5402045,5403045,5404045,5405045,5406045,5407045,5408045,5409045,5410145,5411145,5412145,5413145,5414145,5415145,5416145,5417145,5418145,5419145,5420245,5421245,5422245,5423245,5424245,5425245,5426245,5427245,5428245,5429245,5430345,5431345,5432345,5433345,5434345,5435345,5436345,5437345,5438345,5439345,5440445,5441445,5442445,5443445,5444445,5445445,5446445,5447445,5448445,5449445,5450545,5451545,5452545,5453545,5454545,5455545,5456545,5457545,5458545,5459545,5460645,5461645,5462645,5463645,5464645,5465645,5466645,5467645,5468645,5469645,5470745,5471745,5472745,5473745,5474745,5475745,5476745,5477745,5478745,5479745,5480845,5481845,5482845,5483845,5484845,5485845,5486845,5487845,5488845,5489845,5490945,5491945,5492945,5493945,5494945,5495945,5496945,5497945,5498945,5499945,5500055,5501055,5502055,5503055,5504055,5505055,5506055,5507055,5508055,5509055,5510155,5511155,5512155,5513155,5514155,5515155,5516155,5517155,5518155,5519155,5520255,5521255,5522255,5523255,5524255,5525255,5526255,5527255,5528255,5529255,5530355,5531355,5532355,5533355,5534355,5535355,5536355,5537355,5538355,5539355,5540455,5541455,5542455,5543455,5544455,5545455,5546455,5547455,5548455,5549455,5550555,5551555,5552555,5553555,5554555,5555555,5556555,5557555,5558555,5559555,5560655,5561655,5562655,5563655,5564655,5565655,5566655,5567655,5568655,5569655,5570755,5571755,5572755,5573755,5574755,5575755,5576755,5577755,5578755,5579755,5580855,5581855,5582855,5583855,5584855,5585855,5586855,5587855,5588855,5589855,5590955,5591955,5592955,5593955,5594955,5595955,5596955,5597955,5598955,5599955,5600065,5601065,5602065,5603065,5604065,5605065,5606065,5607065,5608065,5609065,5610165,5611165,5612165,5613165,5614165,5615165,5616165,5617165,5618165,5619165,5620265,5621265,5622265,5623265,5624265,5625265,5626265,5627265,5628265,5629265,5630365,5631365,5632365,5633365,5634365,5635365,5636365,5637365,5638365,5639365,5640465,5641465,5642465,5643465,5644465,5645465,5646465,5647465,5648465,5649465,5650565,5651565,5652565,5653565,5654565,5655565,5656565,5657565,5658565,5659565,5660665,5661665,5662665,5663665,5664665,5665665,5666665,5667665,5668665,5669665,5670765,5671765,5672765,5673765,5674765,5675765,5676765,5677765,5678765,5679765,5680865,5681865,5682865,5683865,5684865,5685865,5686865,5687865,5688865,5689865,5690965,5691965,5692965,5693965,5694965,5695965,5696965,5697965,5698965,5699965,5700075,5701075,5702075,5703075,5704075,5705075,5706075,5707075,5708075,5709075,5710175,5711175,5712175,5713175,5714175,5715175,5716175,5717175,5718175,5719175,5720275,5721275,5722275,5723275,5724275,5725275,5726275,5727275,5728275,5729275,5730375,5731375,5732375,5733375,5734375,5735375,5736375,5737375,5738375,5739375,5740475,5741475,5742475,5743475,5744475,5745475,5746475,5747475,5748475,5749475,5750575,5751575,5752575,5753575,5754575,5755575,5756575,5757575,5758575,5759575,5760675,5761675,5762675,5763675,5764675,5765675,5766675,5767675,5768675,5769675,5770775,5771775,5772775,5773775,5774775,5775775,5776775,5777775,5778775,5779775,5780875,5781875,5782875,5783875,5784875,5785875,5786875,5787875,5788875,5789875,5790975,5791975,5792975,5793975,5794975,5795975,5796975,5797975,5798975,5799975,5800085,5801085,5802085,5803085,5804085,5805085,5806085,5807085,5808085,5809085,5810185,5811185,5812185,5813185,5814185,5815185,5816185,5817185,5818185,5819185,5820285,5821285,5822285,5823285,5824285,5825285,5826285,5827285,5828285,5829285,5830385,5831385,5832385,5833385,5834385,5835385,5836385,5837385,5838385,5839385,5840485,5841485,5842485,5843485,5844485,5845485,5846485,5847485,5848485,5849485,5850585,5851585,5852585,5853585,5854585,5855585,5856585,5857585,5858585,5859585,5860685,5861685,5862685,5863685,5864685,5865685,5866685,5867685,5868685,5869685,5870785,5871785,5872785,5873785,5874785,5875785,5876785,5877785,5878785,5879785,5880885,5881885,5882885,5883885,5884885,5885885,5886885,5887885,5888885,5889885,5890985,5891985,5892985,5893985,5894985,5895985,5896985,5897985,5898985,5899985,5900095,5901095,5902095,5903095,5904095,5905095,5906095,5907095,5908095,5909095,5910195,5911195,5912195,5913195,5914195,5915195,5916195,5917195,5918195,5919195,5920295,5921295,5922295,5923295,5924295,5925295,5926295,5927295,5928295,5929295,5930395,5931395,5932395,5933395,5934395,5935395,5936395,5937395,5938395,5939395,5940495,5941495,5942495,5943495,5944495,5945495,5946495,5947495,5948495,5949495,5950595,5951595,5952595,5953595,5954595,5955595,5956595,5957595,5958595,5959595,5960695,5961695,5962695,5963695,5964695,5965695,5966695,5967695,5968695,5969695,5970795,5971795,5972795,5973795,5974795,5975795,5976795,5977795,5978795,5979795,5980895,5981895,5982895,5983895,5984895,5985895,5986895,5987895,5988895,5989895,5990995,5991995,5992995,5993995,5994995,5995995,5996995,5997995,5998995,5999995,6000006,6001006,6002006,6003006,6004006,6005006,6006006,6007006,6008006,6009006,6010106,6011106,6012106,6013106,6014106,6015106,6016106,6017106,6018106,6019106,6020206,6021206,6022206,6023206,6024206,6025206,6026206,6027206,6028206,6029206,6030306,6031306,6032306,6033306,6034306,6035306,6036306,6037306,6038306,6039306,6040406,6041406,6042406,6043406,6044406,6045406,6046406,6047406,6048406,6049406,6050506,6051506,6052506,6053506,6054506,6055506,6056506,6057506,6058506,6059506,6060606,6061606,6062606,6063606,6064606,6065606,6066606,6067606,6068606,6069606,6070706,6071706,6072706,6073706,6074706,6075706,6076706,6077706,6078706,6079706,6080806,6081806,6082806,6083806,6084806,6085806,6086806,6087806,6088806,6089806,6090906,6091906,6092906,6093906,6094906,6095906,6096906,6097906,6098906,6099906,6100016,6101016,6102016,6103016,6104016,6105016,6106016,6107016,6108016,6109016,6110116,6111116,6112116,6113116,6114116,6115116,6116116,6117116,6118116,6119116,6120216,6121216,6122216,6123216,6124216,6125216,6126216,6127216,6128216,6129216,6130316,6131316,6132316,6133316,6134316,6135316,6136316,6137316,6138316,6139316,6140416,6141416,6142416,6143416,6144416,6145416,6146416,6147416,6148416,6149416,6150516,6151516,6152516,6153516,6154516,6155516,6156516,6157516,6158516,6159516,6160616,6161616,6162616,6163616,6164616,6165616,6166616,6167616,6168616,6169616,6170716,6171716,6172716,6173716,6174716,6175716,6176716,6177716,6178716,6179716,6180816,6181816,6182816,6183816,6184816,6185816,6186816,6187816,6188816,6189816,6190916,6191916,6192916,6193916,6194916,6195916,6196916,6197916,6198916,6199916,6200026,6201026,6202026,6203026,6204026,6205026,6206026,6207026,6208026,6209026,6210126,6211126,6212126,6213126,6214126,6215126,6216126,6217126,6218126,6219126,6220226,6221226,6222226,6223226,6224226,6225226,6226226,6227226,6228226,6229226,6230326,6231326,6232326,6233326,6234326,6235326,6236326,6237326,6238326,6239326,6240426,6241426,6242426,6243426,6244426,6245426,6246426,6247426,6248426,6249426,6250526,6251526,6252526,6253526,6254526,6255526,6256526,6257526,6258526,6259526,6260626,6261626,6262626,6263626,6264626,6265626,6266626,6267626,6268626,6269626,6270726,6271726,6272726,6273726,6274726,6275726,6276726,6277726,6278726,6279726,6280826,6281826,6282826,6283826,6284826,6285826,6286826,6287826,6288826,6289826,6290926,6291926,6292926,6293926,6294926,6295926,6296926,6297926,6298926,6299926,6300036,6301036,6302036,6303036,6304036,6305036,6306036,6307036,6308036,6309036,6310136,6311136,6312136,6313136,6314136,6315136,6316136,6317136,6318136,6319136,6320236,6321236,6322236,6323236,6324236,6325236,6326236,6327236,6328236,6329236,6330336,6331336,6332336,6333336,6334336,6335336,6336336,6337336,6338336,6339336,6340436,6341436,6342436,6343436,6344436,6345436,6346436,6347436,6348436,6349436,6350536,6351536,6352536,6353536,6354536,6355536,6356536,6357536,6358536,6359536,6360636,6361636,6362636,6363636,6364636,6365636,6366636,6367636,6368636,6369636,6370736,6371736,6372736,6373736,6374736,6375736,6376736,6377736,6378736,6379736,6380836,6381836,6382836,6383836,6384836,6385836,6386836,6387836,6388836,6389836,6390936,6391936,6392936,6393936,6394936,6395936,6396936,6397936,6398936,6399936,6400046,6401046,6402046,6403046,6404046,6405046,6406046,6407046,6408046,6409046,6410146,6411146,6412146,6413146,6414146,6415146,6416146,6417146,6418146,6419146,6420246,6421246,6422246,6423246,6424246,6425246,6426246,6427246,6428246,6429246,6430346,6431346,6432346,6433346,6434346,6435346,6436346,6437346,6438346,6439346,6440446,6441446,6442446,6443446,6444446,6445446,6446446,6447446,6448446,6449446,6450546,6451546,6452546,6453546,6454546,6455546,6456546,6457546,6458546,6459546,6460646,6461646,6462646,6463646,6464646,6465646,6466646,6467646,6468646,6469646,6470746,6471746,6472746,6473746,6474746,6475746,6476746,6477746,6478746,6479746,6480846,6481846,6482846,6483846,6484846,6485846,6486846,6487846,6488846,6489846,6490946,6491946,6492946,6493946,6494946,6495946,6496946,6497946,6498946,6499946,6500056,6501056,6502056,6503056,6504056,6505056,6506056,6507056,6508056,6509056,6510156,6511156,6512156,6513156,6514156,6515156,6516156,6517156,6518156,6519156,6520256,6521256,6522256,6523256,6524256,6525256,6526256,6527256,6528256,6529256,6530356,6531356,6532356,6533356,6534356,6535356,6536356,6537356,6538356,6539356,6540456,6541456,6542456,6543456,6544456,6545456,6546456,6547456,6548456,6549456,6550556,6551556,6552556,6553556,6554556,6555556,6556556,6557556,6558556,6559556,6560656,6561656,6562656,6563656,6564656,6565656,6566656,6567656,6568656,6569656,6570756,6571756,6572756,6573756,6574756,6575756,6576756,6577756,6578756,6579756,6580856,6581856,6582856,6583856,6584856,6585856,6586856,6587856,6588856,6589856,6590956,6591956,6592956,6593956,6594956,6595956,6596956,6597956,6598956,6599956,6600066,6601066,6602066,6603066,6604066,6605066,6606066,6607066,6608066,6609066,6610166,6611166,6612166,6613166,6614166,6615166,6616166,6617166,6618166,6619166,6620266,6621266,6622266,6623266,6624266,6625266,6626266,6627266,6628266,6629266,6630366,6631366,6632366,6633366,6634366,6635366,6636366,6637366,6638366,6639366,6640466,6641466,6642466,6643466,6644466,6645466,6646466,6647466,6648466,6649466,6650566,6651566,6652566,6653566,6654566,6655566,6656566,6657566,6658566,6659566,6660666,6661666,6662666,6663666,6664666,6665666,6666666,6667666,6668666,6669666,6670766,6671766,6672766,6673766,6674766,6675766,6676766,6677766,6678766,6679766,6680866,6681866,6682866,6683866,6684866,6685866,6686866,6687866,6688866,6689866,6690966,6691966,6692966,6693966,6694966,6695966,6696966,6697966,6698966,6699966,6700076,6701076,6702076,6703076,6704076,6705076,6706076,6707076,6708076,6709076,6710176,6711176,6712176,6713176,6714176,6715176,6716176,6717176,6718176,6719176,6720276,6721276,6722276,6723276,6724276,6725276,6726276,6727276,6728276,6729276,6730376,6731376,6732376,6733376,6734376,6735376,6736376,6737376,6738376,6739376,6740476,6741476,6742476,6743476,6744476,6745476,6746476,6747476,6748476,6749476,6750576,6751576,6752576,6753576,6754576,6755576,6756576,6757576,6758576,6759576,6760676,6761676,6762676,6763676,6764676,6765676,6766676,6767676,6768676,6769676,6770776,6771776,6772776,6773776,6774776,6775776,6776776,6777776,6778776,6779776,6780876,6781876,6782876,6783876,6784876,6785876,6786876,6787876,6788876,6789876,6790976,6791976,6792976,6793976,6794976,6795976,6796976,6797976,6798976,6799976,6800086,6801086,6802086,6803086,6804086,6805086,6806086,6807086,6808086,6809086,6810186,6811186,6812186,6813186,6814186,6815186,6816186,6817186,6818186,6819186,6820286,6821286,6822286,6823286,6824286,6825286,6826286,6827286,6828286,6829286,6830386,6831386,6832386,6833386,6834386,6835386,6836386,6837386,6838386,6839386,6840486,6841486,6842486,6843486,6844486,6845486,6846486,6847486,6848486,6849486,6850586,6851586,6852586,6853586,6854586,6855586,6856586,6857586,6858586,6859586,6860686,6861686,6862686,6863686,6864686,6865686,6866686,6867686,6868686,6869686,6870786,6871786,6872786,6873786,6874786,6875786,6876786,6877786,6878786,6879786,6880886,6881886,6882886,6883886,6884886,6885886,6886886,6887886,6888886,6889886,6890986,6891986,6892986,6893986,6894986,6895986,6896986,6897986,6898986,6899986,6900096,6901096,6902096,6903096,6904096,6905096,6906096,6907096,6908096,6909096,6910196,6911196,6912196,6913196,6914196,6915196,6916196,6917196,6918196,6919196,6920296,6921296,6922296,6923296,6924296,6925296,6926296,6927296,6928296,6929296,6930396,6931396,6932396,6933396,6934396,6935396,6936396,6937396,6938396,6939396,6940496,6941496,6942496,6943496,6944496,6945496,6946496,6947496,6948496,6949496,6950596,6951596,6952596,6953596,6954596,6955596,6956596,6957596,6958596,6959596,6960696,6961696,6962696,6963696,6964696,6965696,6966696,6967696,6968696,6969696,6970796,6971796,6972796,6973796,6974796,6975796,6976796,6977796,6978796,6979796,6980896,6981896,6982896,6983896,6984896,6985896,6986896,6987896,6988896,6989896,6990996,6991996,6992996,6993996,6994996,6995996,6996996,6997996,6998996,6999996};
}
}


using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        static int N,equal;
        static string board;
        static List<int> position = new List<int>();

        static void Main(string[] args)
        {
            N = Convert.ToInt32(Console.ReadLine());
            board = Console.ReadLine();

            for (int i = 0; i < board.Length; ++i)
                if (board[i] == '*')
                    position.Add(i+1);

            for(int a=0; a<position.Count; ++a)
                 for(int b=a+1; b<position.Count; ++b)
                     for(int c=b+1; c<position.Count; ++c)
                         for(int d=c+1; d<position.Count; ++d)
                             for(int e=c+1; e<position.Count; ++e)
                             {
                                 equal = position[b]-position[a];
                                 if (position[c] - position[b] == equal && position[d] - position[c] == equal && position[e] - position[d] == equal)
                                 {
                                     Console.WriteLine("yes");
                                     return;
                                 }
                              }

            Console.WriteLine("no");

        }

    }

}


using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        static int N,pos,cnt;
        static string board;

        static void Main(string[] args)
        {
            N = Convert.ToInt32(Console.ReadLine());
            board = Console.ReadLine();

            for (int i = 0; i < board.Length; ++i)
                for (int j = 1; j <= board.Length; ++j)
                {
                    pos = i;
                    cnt = 0;
                    while (pos < board.Length && board[pos] == '*')
                    {
                        ++cnt;
                        pos += j;
                    }

                    if (cnt == 5)
                    {
                        Console.WriteLine("yes");
                        return;
                    }

                }

            Console.WriteLine("no");

        }

    }

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using static Template;
using static System.Console;
using static System.Convert;
using static System.Math;
using Pi = Pair<int, int>;

class Solver
{
    public void Solve(Scanner sc)
    {
        var s = ReadLine().ToCharArray();
        var l = new List<string> { new string(s) };
        for(var i = 0; i < s.Length; i++)
        {
            for (var j = s.Length - 1; j > 0; j--)
                swap(ref s[j], ref s[j - 1]);
            if (!l.Contains(new string(s)))
                l.Add(new string(s));

        }
        WriteLine(l.Count);
    }
}

#region Template
public static class Template
{
    static void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        new Solver().Solve(new Scanner());
        Console.Out.Flush();
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmin<T>(ref T a, T b) where T : IComparable<T>
    { if (a.CompareTo(b) == 1) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmax<T>(ref T a, T b) where T : IComparable<T>
    { if (a.CompareTo(b) == -1) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(ref T a, ref T b)
    { var t = b; b = a; a = t; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static T[] Create<T>(int n, Func<T> f)
    {
        var rt = new T[n];
        for (var i = 0; i < rt.Length; ++i)
            rt[i] = f();
        return rt;
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static T[] Create<T>(int n, Func<int, T> f)
    {
        var rt = new T[n];
        for (var i = 0; i < rt.Length; ++i)
            rt[i] = f(i);
        return rt;
    }
    public static void Fail<T>(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }
}

public class Scanner
{
    public string Str => Console.ReadLine().Trim();
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();
    public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();
    public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());
    public int[] ArrInt1D(int n) => Create(n, () => Int);
    public long[] ArrLong1D(int n) => Create(n, () => Long);
    public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);
    public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);
    public Pair<T1, T2> PairMake<T1, T2>() => new Pair<T1, T2>(Next<T1>(), Next<T2>());
    public Pair<T1, T2, T3> PairMake<T1, T2, T3>() => new Pair<T1, T2, T3>(Next<T1>(), Next<T2>(), Next<T3>());
    private Queue<string> q = new Queue<string>();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public T Next<T>() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }
    public void Make<T1>(out T1 v1) => v1 = Next<T1>();
    public void Make<T1, T2>(out T1 v1, out T2 v2) { v1 = Next<T1>(); v2 = Next<T2>(); }
    public void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next<T3>(); }
    public void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next<T4>(); }
    public void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next<T5>(); }
    public void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next<T6>(); }
}

public class Pair<T1, T2> : IComparable<Pair<T1, T2>>
{
    public T1 v1;
    public T2 v2;
    public Pair() { }
    public Pair(T1 v1, T2 v2)
    { this.v1 = v1; this.v2 = v2; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2> p)
    {
        var c = Comparer<T1>.Default.Compare(v1, p.v1);
        if (c == 0)
            c = Comparer<T2>.Default.Compare(v2, p.v2);
        return c;
    }
    public override string ToString() => $"{v1.ToString()} {v2.ToString()}";
    public void Tie(out T1 a, out T2 b) { a = v1; b = v2; }
}

public class Pair<T1, T2, T3> : Pair<T1, T2>, IComparable<Pair<T1, T2, T3>>
{
    public T3 v3;
    public Pair() : base() { }
    public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)
    { this.v3 = v3; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2, T3> p)
    {
        var c = base.CompareTo(p);
        if (c == 0)
            c = Comparer<T3>.Default.Compare(v3, p.v3);
        return c;
    }
    public override string ToString() => $"{base.ToString()} {v3.ToString()}";
    public void Tie(out T1 a, out T2 b, out T3 c) { Tie(out a, out b); c = v3; }
}
#endregion


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{

    class Program
    {

        public void SelectionSort(int []arr, int startIndx, int lastIndx)
        {
            if (startIndx >= lastIndx) return;

            int minIndx;
            int temp;

            minIndx = MinIndx( arr, startIndx, lastIndx);

            temp = arr[startIndx];
            arr[startIndx] = arr[minIndx];
            arr[minIndx] = temp;

            SelectionSort( arr, startIndx+1, lastIndx);
        }

        public int MinIndx( int[] arr, int startIndx, int lastIndx)
        {
            int minVal = arr[startIndx];
            int minIndx = startIndx;
            for (int i = startIndx; i < arr.Length; ++i)
            {
                if (arr[i] < minVal)
                {
                    minVal = arr[i];
                    minIndx = i;
                }
            }
            return minIndx;
        }

        public void PrintArr(int []arr)
        {
            for (int i = 0; i < arr.Length; ++i)
            {
                Console.WriteLine(arr[i]);
            }
        }

        public void SelectionSortIt(int []arr)
        {
            for (int i = 0; i < arr.Length; ++i)
            {
                int minIndx = MinIndx(arr, i, arr.Length);
                int temp = arr[i];
                arr[i] = arr[minIndx];
                arr[minIndx] = temp;
            }
        }

        public void InsertionSort(int []arr)
        {
            //12, 11, 13, 5, 6
            int len = arr.Length;
            for (int i = 1; i < len; ++i )
            {
                int j = i;
                while(j > 0 && arr[j] < arr[j-1])
                {
                    int temp = arr[j];
                    arr[j] = arr[j - 1];
                    arr[j - 1] = temp;
                    --j;
                }
            }
        }

        public void BubbleSort(int []arr)
        {
            int len = arr.Length;
            for (int i = 0; i < len; ++i )
            {
                for (int j = 0; j < len-1; ++j)
                {
                    if (arr[j + 1] < arr[j])
                    {
                        int temp = arr[j];
                        arr[j] = arr[j + 1];
                        arr[j + 1] = temp;
                    }
                }
            }
        }

        public void Partion(int []arr, int low, int high)
        {

        }

        public int GetSpaces(string str, int i)
        {
            if(i>=str.Length) return 0;
            return (str[i] == ' ') ? 1 + GetSpaces(str, i + 1) : GetSpaces(str, i + 1);
        }

        public string WayTooLongWords(string word)
        {
            string abbr = "";
            if (word.Length <= 10)
            {
                abbr = word;
            }
            else
            {
                abbr += word[0];
                int count = 0, len = word.Length;
                for (int i = 1; i < len-1; ++i)
                {
                    ++count;
                }
                abbr += count.ToString() + word[len-1];
            }
            return abbr;
        }

        public int HongcowLearnsTheCyclicShift(string word)
        {
            int count = 0;
            int len = word.Length;
            string temp1 = "", temp2 = word;
            do
            {
                temp1 += temp2[len - 1];
                for (int i = 0; i < len - 1; ++i)
                {
                    temp1 += temp2[i];
                }
                temp2 = temp1;
                temp1 = "";
                count++;
            }
            while(temp2 != word);

            return count;
        }

        static void Main(string[] args)
        {
            Program p = new Program();
            Console.WriteLine(p.HongcowLearnsTheCyclicShift(Console.ReadLine()));
            /*int t = 0;
            t = int.Parse(Console.ReadLine());
            for (int i = 0; i < t; ++i)
            {
                string word = Console.ReadLine();
                Console.WriteLine(p.WayTooLongWords(word));
            }*/
            //Console.WriteLine(p.GetSpaces("am you mo el ",0));
        }

    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using Solver.Ex;
using Watch = System.Diagnostics.Stopwatch;
using StringBuilder = System.Text.StringBuilder;
using BitVector = System.Collections.Specialized.BitVector32;
namespace Solver
{
    public class Solver
    {
        public void Solve()
        {
            var a = sc.Long();
            var b = sc.Long();
            const long mod = (long)1e9 + 7;
            var ret = ((((a * (a + 1) / 2) % mod) * b + a) % mod) * ((b * (b - 1) / 2) % mod) % mod;
            IO.Printer.Out.PrintLine(ret);
        }
        internal IO.Scanner sc;

    }
    #region Main and Settings
    static class Program
    {
        static void Main(string[] arg)
        {
#if DEBUG
            var errStream = new System.IO.FileStream(@"..\..\dbg.out", System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
            System.Diagnostics.Debug.Listeners.Add(new System.Diagnostics.TextWriterTraceListener(errStream, "debugStream"));
            System.Diagnostics.Debug.AutoFlush = false;
            var sw = new Watch();
            sw.Start();
            try
            {
#endif
            var solver = new Solver();
            solver.sc = new IO.Scanner(Console.In);
            IO.Printer.Out = new IO.Printer(new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
            solver.Solve();
            IO.Printer.Out.Flush();
#if DEBUG
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.Message);
                Console.Error.WriteLine(ex.StackTrace);
            }
            finally
            {
                sw.Stop();
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Error.WriteLine("Time:{0}ms", sw.ElapsedMilliseconds);
                System.Diagnostics.Debug.Close();
                System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
            }
#endif
        }

    }
    #endregion
}
#region IO Helper
namespace Solver.IO
{
    public class Printer
    {
        static Printer()
        {
            Out = new Printer(Console.Out);
        }
        public static Printer Out { get; set; }
        private readonly System.IO.TextWriter writer;
        private readonly System.Globalization.CultureInfo info;
        public string Separator { get; set; }
        public string NewLine { get { return writer.NewLine; } set { writer.NewLine = value ?? "\n"; } }
        public Printer(System.IO.TextWriter tw = null, System.Globalization.CultureInfo ci = null, string separator = null, string newLine = null)
        {
            writer = tw ?? System.IO.TextWriter.Null;
            info = ci ?? System.Globalization.CultureInfo.InvariantCulture;
            NewLine = newLine;
            Separator = separator ?? " ";
        }
        public void Print(int num) { writer.Write(num.ToString(info)); }
        public void Print(int num, string format) { writer.Write(num.ToString(format, info)); }
        public void Print(long num) { writer.Write(num.ToString(info)); }
        public void Print(long num, string format) { writer.Write(num.ToString(format, info)); }
        public void Print(double num) { writer.Write(num.ToString(info)); }
        public void Print(double num, string format) { writer.Write(num.ToString(format, info)); }
        public void Print(string str) { writer.Write(str); }
        public void Print(string format, params object[] arg) { writer.Write(string.Format(info, format, arg)); }
        public void Print<T>(string format, IEnumerable<T> sources) { writer.Write(format, sources.OfType<object>().ToArray()); }
        public void Print(IEnumerable<char> sources) { writer.Write(sources.AsString()); }
        public void Print<T>(IEnumerable<T> sources)
        {
            var res = new System.Text.StringBuilder();
            foreach (var x in sources)
            {
                res.AppendFormat(info, "{0}", x);
                if (string.IsNullOrEmpty(Separator))
                    res.Append(Separator);
            }
            writer.Write(res.ToString(0, res.Length - Separator.Length));
        }
        public void PrintLine() { writer.WriteLine(); }
        public void PrintLine(int num) { writer.WriteLine(num.ToString(info)); }
        public void PrintLine(int num, string format) { writer.WriteLine(num.ToString(format, info)); }
        public void PrintLine(long num) { writer.WriteLine(num.ToString(info)); }
        public void PrintLine(long num, string format) { writer.WriteLine(num.ToString(format, info)); }
        public void PrintLine(double num) { writer.WriteLine(num.ToString(info)); }
        public void PrintLine(double num, string format) { writer.WriteLine(num.ToString(format, info)); }
        public void PrintLine(string str) { writer.WriteLine(str); }
        public void PrintLine(string format, params object[] arg) { writer.WriteLine(string.Format(info, format, arg)); }
        public void PrintLine<T>(string format, IEnumerable<T> sources) { writer.WriteLine(format, sources.OfType<object>().ToArray()); }
        public void PrintLine<T>(IEnumerable<T> sources)
        {
            var res = new StringBuilder();
            foreach (var x in sources)
            {
                res.AppendFormat(info, "{0}", x);
                if (!string.IsNullOrEmpty(Separator))
                    res.Append(Separator);
            }
            writer.WriteLine(res.ToString(0, res.Length - Separator.Length));
        }
        public void Flush() { writer.Flush(); }
    }
    public class Scanner
    {
        readonly private System.Globalization.CultureInfo info;
        readonly System.IO.TextReader reader;
        string[] buffer = new string[0];
        int position;

        public char[] Separator { get; set; }
        public Scanner(System.IO.TextReader reader = null, string separator = null, System.Globalization.CultureInfo info = null)
        {

            this.reader = reader ?? Console.In;
            if (string.IsNullOrEmpty(separator))
                separator = " ";
            this.Separator = separator.ToCharArray();
            this.info = info ?? System.Globalization.CultureInfo.InvariantCulture;
        }
        public string Scan()
        {
            if (this.position < this.buffer.Length)
                return this.buffer[this.position++];
            do this.buffer = this.reader.ReadLine().Split(this.Separator, StringSplitOptions.RemoveEmptyEntries);
            while (this.buffer.Length == 0);
            this.position = 0;
            return this.buffer[this.position++];
        }

        public string ScanLine()
        {
            if (this.position >= this.buffer.Length)
                return this.reader.ReadLine();
            else
            {
                var sb = new System.Text.StringBuilder();
                for (; this.position < buffer.Length; this.position++)
                {
                    sb.Append(this.buffer[this.position]);
                    sb.Append(' ');
                }
                return sb.ToString();
            }
        }
        public string[] ScanArray(int length)
        {
            var ar = new string[length];
            for (int i = 0; i < length; i++)
                ar[i] = this.Scan();
            return ar;
        }

        public int Integer()
        {
            return int.Parse(this.Scan(), info);
        }
        public long Long()
        {
            return long.Parse(this.Scan(), info);
        }
        public double Double()
        {
            return double.Parse(this.Scan(), info);
        }
        public double Double(string str)
        {
            return double.Parse(str, info);
        }

        public int[] IntArray(int length)
        {
            var a = new int[length];
            for (int i = 0; i < length; i++)
                a[i] = this.Integer();
            return a;
        }
        public long[] LongArray(int length)
        {
            var a = new long[length];
            for (int i = 0; i < length; i++)
                a[i] = this.Long();
            return a;
        }
        public double[] DoubleArray(int length)
        {
            var a = new double[length];
            for (int i = 0; i < length; i++)
                a[i] = this.Double();
            return a;
        }

    }

}
#endregion
#region Extension
namespace Solver.Ex
{
    static public partial class EnumerableEx
    {
        static public string AsString(this IEnumerable<char> source)
        {
            return new string(source.ToArray());
        }
        static public string AsJoinedString<T>(this IEnumerable<T> source, string separator = " ")
        {
            return string.Join(separator, source);
        }
        static public T[] Enumerate<T>(this int n, Func<int, T> selector)
        {
            var res = new T[n];
            for (int i = 0; i < n; i++)
                res[i] = selector(i);
            return res;
        }
    }
}
#endregion
//*/


using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;

namespace codeforces
{
	class Program
	{
		public const int Osn = 1000000007;

		public class Pair
		{
			public long First;

			public long Second;
		}

		public class PairComparer : IComparer<Pair>
		{
			public int Compare(Pair x, Pair y)
			{
				if (x.First < y.First || (x.First == y.First && x.Second > y.Second))
					return -1;
				return 1;
			}
		}

		public static long GetGcd(long a, long b)
		{
			while (true)
			{
				if (b == 0)
					return a;
				var a1 = a;
				a = b;
				b = a1 % b;

			}
		}

		public static void WriteYesNo(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string ReadString()
		{
			return Console.ReadLine();
		}

		public static List<int> ReadListOfInts()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static List<long> ReadListOfLongs()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(long.Parse).ToList();
		}

		public static int ReadInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static long ReadLong()
		{
			var s = Console.ReadLine();
			return long.Parse(s);
		}

		public class Vertex
		{
			public int Was;

			public List<int> Edges;
		}

		public static List<Vertex> Graph = new List<Vertex>();

		public static bool Dfs(int u)
		{
			if (Graph[u].Was == 1) return true;
			if (Graph[u].Was == 2) return false;
			Graph[u].Was = 1;
			foreach (var t in Graph[u].Edges)
			{
				if (Dfs(t)) return true;
			}

			Graph[u].Was = 2;
			return false;
		}

		public static bool IsPrime(int x)
		{
			for (var j = 2; j * j <= x; ++j)
				if (x % j == 0)
					return false;
			return true;
		}

		public class LinkedVertex
		{
			public int Next;

			public int Prev;

			public int Value;
		}

		public static int BinarySearch(List<int> list, int value)
		{
			var l = -1;
			var r = list.Count;
			while (r - l > 1)
			{
				var m = (r + l) / 2;
				if (list[m] >= value)
					r = m;
				else
					l = m;
			}

			return r;
		}

		private static void Main()
		{
			var l = ReadListOfLongs();
			var a = l[0];
			var b = l[1];
			long ans = (a * (a + 1) / 2) % Osn;
			ans = (ans * b + a) % Osn;
			ans = (((b * (b - 1) / 2) % Osn) * ans) % Osn;
			Console.WriteLine(ans);
			Console.ReadLine();
		}
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using System.Diagnostics;
using System.Numerics;
using static System.Console;
using static System.Convert;
using static System.Math;
using static Template;
using Pi = Pair<int, int>;

class Solver
{
    public void Solve(Scanner sc)
    {
        var G = sc.Grid(10);
        var gh = new[] { 0,  0, 1, 1, 1, -1, -1, -1 };
        var gw = new[] { 1,  -1, 1, 0, -1, 1, 0, -1 };
        for (int i = 0; i < 10; i++)
            for (int j = 0; j < 10; j++)
            {
                for(int k = 0; k < 8; k++)
                {
                    var t = 0;
                    var c = 0;
                    for(int l = 0; l < 5; l++)
                    {
                        int y = gh[k] * l + i, x = gw[k] * l + j;
                        if (0 <= y && y < 10 && 0 <= x && x < 10)
                        {
                            t += ToInt32(G[y][x] == 'X');
                            c += ToInt32(G[y][x] == '.');
                        }
                        else goto END;
                    }
                    if (t == 4 && c == 1) Fail("YES");
                END:;
                }
            }
        Console.WriteLine("NO");
    }
}

#region Template
public static class Template
{
    static void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        new Solver().Solve(new Scanner());
        Console.Out.Flush();
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmin<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) > 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmax<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(ref T a, ref T b) { var t = b; b = a; a = t; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(this IList<T> A, int i, int j) { var t = A[i]; A[i] = A[j]; A[j] = t; }
    public static T[] Create<T>(int n, Func<T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(); return rt; }
    public static T[] Create<T>(int n, Func<int, T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(i); return rt; }
    public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> A) => A.OrderBy(v => Guid.NewGuid());
    public static int CompareTo<T>(this T[] A, T[] B, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; for (var i = 0; i < Min(A.Length, B.Length); i++) { int c = cmp(A[i], B[i]); if (c > 0) return 1; else if (c < 0) return -1; } if (A.Length == B.Length) return 0; if (A.Length > B.Length) return 1; else return -1; }
    public static int MaxElement<T>(this IList<T> A, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; T max = A[0]; int rt = 0; for (int i = 1; i < A.Count; i++) if (cmp(max, A[i]) < 0) { max = A[i]; rt = i; } return rt; }
    public static T PopBack<T>(this List<T> A) { var v = A[A.Count - 1]; A.RemoveAt(A.Count - 1); return v; }
    public static void Fail<T>(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }
}
public class Scanner
{
    public string Str => Console.ReadLine().Trim();
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();
    public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();
    public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());
    public int[] ArrInt1D(int n) => Create(n, () => Int);
    public long[] ArrLong1D(int n) => Create(n, () => Long);
    public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);
    public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);
    private Queue<string> q = new Queue<string>();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public T Next<T>() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }
    public void Make<T1>(out T1 v1) => v1 = Next<T1>();
    public void Make<T1, T2>(out T1 v1, out T2 v2) { v1 = Next<T1>(); v2 = Next<T2>(); }
    public void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next<T3>(); }
    public void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next<T4>(); }
    public void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next<T5>(); }
    public void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next<T6>(); }
    public void Make<T1, T2, T3, T4, T5, T6, T7>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6, out T7 v7) { Make(out v1, out v2, out v3, out v4, out v5, out v6); v7 = Next<T7>(); }
    //public (T1, T2) Make<T1, T2>() { Make(out T1 v1, out T2 v2); return (v1, v2); }
    //public (T1, T2, T3) Make<T1, T2, T3>() { Make(out T1 v1, out T2 v2, out T3 v3); return (v1, v2, v3); }
    //public (T1, T2, T3, T4) Make<T1, T2, T3, T4>() { Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4); return (v1, v2, v3, v4); }
}
public class Pair<T1, T2> : IComparable<Pair<T1, T2>>
{
    public T1 v1;
    public T2 v2;
    public Pair() { }
    public Pair(T1 v1, T2 v2)
    { this.v1 = v1; this.v2 = v2; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2> p)
    {
        var c = Comparer<T1>.Default.Compare(v1, p.v1);
        if (c == 0)
            c = Comparer<T2>.Default.Compare(v2, p.v2);
        return c;
    }
    public override string ToString() => $"{v1.ToString()} {v2.ToString()}";
    public void Deconstruct(out T1 a, out T2 b) { a = v1; b = v2; }
}

public class Pair<T1, T2, T3> : Pair<T1, T2>, IComparable<Pair<T1, T2, T3>>
{
    public T3 v3;
    public Pair() : base() { }
    public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)
    { this.v3 = v3; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2, T3> p)
    {
        var c = base.CompareTo(p);
        if (c == 0)
            c = Comparer<T3>.Default.Compare(v3, p.v3);
        return c;
    }
    public override string ToString() => $"{base.ToString()} {v3.ToString()}";
    public void Deconstruct(out T1 a, out T2 b, out T3 c) { Deconstruct(out a, out b); c = v3; }
}
#endregion


using System;
using System.Linq;
using System.Collections.Generic;

namespace cfr25
{
    class MainClass
    {
		public static void Main(string[] args)
		{
			string[] arr = new string[10];
			for (int i = 0; i < 10; i++)
				arr[i] = Console.ReadLine();
			bool flag = false;
			for (int i = 0; i < 10; i++)
				for (int j = 0; j <= (10 - 5); j++)
				{
					int dot = 0;
					int xxx = 0;
					for (int kl = j; kl < j + 5; kl++)
					{
						if ((arr[i])[kl] == 'X') xxx++;
						if ((arr[i])[kl] == '.') dot++;
					}
					if ((dot == 1) && (xxx == 4)) flag = true;
				}
			if (flag == false)
				for (int i = 0; i < 10; i++)
					for (int j = 0; j <= (10 - 5); j++)
					{
						int dot = 0;
						int xxx = 0;
						for (int kl = j; kl < j + 5; kl++)
						{
							if ((arr[kl])[i] == 'X') xxx++;
							if ((arr[kl])[i] == '.') dot++;
						}
						if ((dot == 1) && (xxx == 4)) flag = true;
					}
			if (flag == false)
				for (int i = 0; i <= (10 - 5); i++)
					for (int j = 0; j <= (10 - 5); j++)
					{
						int dot = 0;
						int xxx = 0;
						for (int kl = j, kll = i; kl < j + 5; kl++, kll++)
						{
							if ((arr[kll])[kl] == 'X') xxx++;
							if ((arr[kll])[kl] == '.') dot++;
						}
						if ((dot == 1) && (xxx == 4)) flag = true;
					}
			if (flag == false)
				for (int i = 9; i >= 4; i--)
					for (int j = 0; j <= (10 - 5); j++)
					{
						int dot = 0;
						int xxx = 0;
						for (int kl = j, kll = i; kl < j + 5; kl++, kll--)
						{
							if ((arr[kll])[kl] == 'X') xxx++;
							if ((arr[kll])[kl] == '.') dot++;
						}
						if ((dot == 1) && (xxx == 4)) flag = true;
					}
			if (!flag)
				Console.WriteLine("NO");
			else Console.WriteLine("YES");
		}
    }
}


using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

class Solver
{
    //  test
    static CodeforcesUtils CF = new CodeforcesUtils( new[]{

@"
100 200 250 150 200 250
"
,
@"
100 50 50 200 200 100
"
,
@"
100 10 200 20 300 30
"
    ,
@"
0 0 0 0 0 0
"

,
@"
1 1 0 1 1 1
"
,
@"
1 0 1 2 1 2
"
,
@"
100 1 100 1 0 1
"

    });

    public void Solve()
    {
        var ss = CF.ReadLine().Split(' ');
        List<int> a = new List<int>();
        foreach (var s in ss)
            a.Add(int.Parse(s));

        if (a[2] == 0 && a[3] > 0)
            CF.WriteLine("Ron");
        else if (a[0]*a[2] == 0 && a[1]*a[3] > 0)
            CF.WriteLine("Ron");
        else if (a[0]*a[2] * a[4] == 0 && a[1]*a[3] * a[5] > 0)
            CF.WriteLine("Ron");

        else if (a[1] * a[3] * a[5] > a[0] * a[2] * a[4])
            CF.WriteLine("Ron");
        else
            CF.WriteLine("Hermione");

    }

    #region test

    static void Main(string[] args)
    {
        System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ru-RU");

#if DEBUG
        for (int t=0;t<CF.TestCount;t++ )
        {
            CF.Test(t);
            new Solver().Solve();
        }
#else
        new Solver().Solve();
#endif
        CF.Close();
    }

    static void TLE()
    {
        for (; ; ) ;
    }

    class CodeforcesUtils
    {
        public void Test(int t)
        {
            _lines = new List<string>();
            string[] ss = _test_input[t].Replace("\n", "").Split('\r');
            for (int i = 0; i < ss.Length; i++)
            {
                if (
                    (i == 0 || i == ss.Length - 1) &&
                    ss[i].Length == 0
                    )
                    continue;

                _lines.Add(ss[i]);
            }
        }

        public int TestCount
        {
            get
            {
                return _test_input.Length;
            }
        }

        public string ReadLine()
        {
#if DEBUG
            string s = null;
            if (_lines.Count > 0)
            {
                s = _lines[0];
                _lines.RemoveAt(0);
            }
            return s;

#else
            //return _sr.ReadLine();
        return Console.In.ReadLine();
#endif
        }

        public void WriteLine(object o)
        {
#if DEBUG
            System.Diagnostics.Trace.WriteLine(o);
#else
            //_sw.WriteLine(o);
        Console.WriteLine(o);
#endif
        }

        public void Write(object o)
        {
#if DEBUG
            System.Diagnostics.Trace.Write(o);
#else
                //_sw.Write(o);
        Console.Write(o);
#endif
        }

        string[] _test_input;

        List<string> _lines;

#if DEBUG
        public CodeforcesUtils(string[] test_input)
        {
            _test_input = test_input;
        }
#else

        public CodeforcesUtils(string[] dummy)
        {
            //_sr = new System.IO.StreamReader("input.txt");
            //_sw = new System.IO.StreamWriter("output.txt");
        }
#endif

        public void Close()
        {
            if( _sr!= null)
                _sr.Close();
            if( _sw != null)
                _sw.Close();
        }

        System.IO.StreamReader _sr=null;
        System.IO.StreamWriter _sw=null;

    }

    #endregion
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

    class Program
    {
        static void Main(string[] args)
        {
            string[] werte = Console.ReadLine().Split(' ');
            int a, b, c, d, e, f;

            a = Convert.ToInt32(werte[0]);
            b = Convert.ToInt32(werte[1]);
            c = Convert.ToInt32(werte[2]);
            d = Convert.ToInt32(werte[3]);
            e = Convert.ToInt32(werte[4]);
            f = Convert.ToInt32(werte[5]);

            if (istOk(a, b, c, d, e, f) == true)
            {
                Console.WriteLine("Ron");
            }
            else
            {
                Console.WriteLine("Hermione");
            }

            Console.ReadLine();
        }

        public static bool istOk(int a, int b, int c, int d, int e, int f)
        {
            bool ex_istOk = false;

            int a1, b1, c1, d1, e1, f1;
            a1 = 0;
            b1 = 0;
            c1 = 0;
            d1 = 0;
            e1 = 0;
            f1 = 0;

            if ( d != 0 )
            {
                if(c==0) ex_istOk = true;

                if (c != 0 && b != 0)
                {
                    if (a == 0) ex_istOk = true;

                    else if(a != 0 && f != 0)
                    {
                        if (e == 0) ex_istOk = true;
                        else
                        {
                            e1 = Delimoe((Delimoe(b, c) / c * d), e);
                            d1 = e1;
                            f1 = e1 / e * f;
                            c1 = d1 / d * c;
                            b1 = c1;
                            a1 = b1 / b * a;

                            if (f1 > a1) ex_istOk = true;
                        }
                    }
                }

            }
            return ex_istOk;
        }

        public static int Delimoe (int a, int b)
        {
            int maxDel = Math.Max(a,b);

            while (maxDel % a != 0 || maxDel % b != 0)
                    maxDel++;

            return maxDel;
        }

    }