/*****************************************************************************/
/*									     */
/*  REGENERATE CYCLES							     */
/*  09/25/11 (dkc)							     */
/*									     */
/*  This C program regenerates cycles for the 3n+c sequence given entry      */
/*  points.  The number of even and odd elements in the extended sequences   */
/*  are counted.							     */
/*									     */
/*    "jump=0" indicates a no-jump attachment point                          */
/*    "jump=1" indicates a one-jump attachment point                         */
/*    "jump=2" indicates a multiple-jump attachment point                    */
/*    "jump=3" indicates a jumped-over attachment point                      */
/*									     */
/*  "delta" denotes the number of odd elements in the jump minus j where     */
/*  t=u(mod 2^j) (for one-jump or multiple-jump attachment points).  The     */
/*  domains of the cycles are also computed.				     */
/*									     */
/*****************************************************************************/
#include <stdio.h>
#include <math.h>
int main () {
int sin[1679+1676+1871+1869+1880]={
1070,29024,7256,1814,1646,4052,1010,722,1448,362,386,3662,6668,2126,4724,1136,
284,1910,1700,758,1052,
4300,1816,454,2578,4696,1174,1492,4894,2086,4210,3436,922,2842,11122,9292,14200,
3550,1582,844,1066,22018,13012,15658,74950,73816,18454,10690,6640,1660,562,958,610,
970,
932,76406,28904,7226,4694,2012,3452,926,1418,1322,2174,1052,3182,2552,638,620,
368,92,728,182,320,80,20,980,2294,1112,278,356,1346,2222,1850,1670,
878,1214,782,8288,2072,518,446,566,464,116,662,500,770,3020,818,1886,
2048,512,128,32,8,2,10448,2612,1364,7736,1934,10796,2276,2156,656,164,
6344,1586,2534,1202,2210,
1354,760,190,2290,2170,1066,652,814,1666,910,1966,2746,1282,802,1288,322,
532,352,88,22,256,64,16,4,442,418,5512,1378,874,580,2002,
6502,4288,1072,268,706,640,160,40,10,
740,392,98,290,362,662,7148,3362,1514,932,428,3746,1658,6662,6824,1706,
4394,2522,1982,1748,770,542,938,2396,5366,6890,3926,8348,2120,530,452,338,
380,500,2936,734,1046,29018,13160,3290,2306,1118,1262,2144,536,134,1316,1640,
410,3044,824,206,1550,1382,2030,2630,3422,2558,2072,518,
1096,274,9334,3754,2746,1888,472,118,298,802,1882,2158,1042,24586,
14464,3616,904,226,1396,1024,256,64,16,4,268,304,76,352,88,22,262,3988,
1756,772,1402,8362,5338,4726,2026,1774,2374,1144,286,7318,2998,1378,2368,592,
148,676,1108,946,2698,2152,538,6904,1726,1648,412,502,442,916,892,4528,
1132,466,2824,706,35578,12058,20836,47728,11932,2122,1828,7876,
2114,1826,1664,416,104,26,1232,308,1340,506,7436,2492,722,2960,740,2636,
2474,6488,1622,902,1304,326,7388,1640,410,1556,8894,3590,2438,1952,488,122,

256,64,16,4,400,100,274,358,2866,1330,754,538,598,2374,6160,1540,
544,136,34,268,5686,6010,1858,952,238,772,2986,1894,5668,1318,3742,3724,
6748,2536,634,724,1078,2122,36304,9076,4120,1030,29014,51520,12880,3220,2662,
356,1004,6332,9356,3272,818,1274,734,4028,9032,2258,4874,2084,1988,728,182,
5282,1934,2948,6656,1664,416,104,26,266,
982,20992,5248,1312,328,82,688,172,2008,502,7870,3208,802,3064,766,544,
136,34,4522,12568,3142,6562,13054,5152,1288,322,874,1048,262,1372,514,8896,
2224,556,4666,12244,17158,10012,2134,1630,868,886,820,8680,2170,55984,13996,3412,
2830,1318,
650,1010,85898,48962,42536,10634,6626,529130,298280,74570,42590,18902,7346,30494,9884,3506,
4838,2072,518,452,5114,7166,6194,15158,5942,2486,1190,704,176,44,266,794,
1076,968,242,9326,3074,3818,2792,698,1616,404,758,542,1130,1280,320,80,
20,1724,1298,17588,3596,932,2684,22448,5612,1310,2588,1622,866,
1684,574,4114,1276,1582,2734,8596,1870,13084,10378,4150,2980,8488,2122,1054,
2116,2332,3574,2656,664,166,1366,1414,2152,538,460,4060,49984,12496,3124,844,
307546,115588,25318,30094,40186,15328,3832,958,33382,387676,354016,88504,22126,68374,39106,17434,
6796,2176,544,136,34,63838,55090,15946,6238,6490,2692,1504,376,94,1306,748,856,
214,766,18802,5740,2260,682,514,1690,892,4762,2044,2476,1342,1039402,390034,82870,
47260,24262,10978,
3482,1334,4652,3194,1352,338,386,404,1028,452,344,86,1304,326,1250,728,
182,1298,746,1658,920,230,16964,3440,860,890,704,176,44,
1966,1588,1096,274,3706,2734,6244,3868,2896,724,5092,3382,1528,382,562,
1708,580,3976,994,33280,8320,2080,520,130,
1340,512,128,32,8,2,5918,2480,620,1076,4460,1886,968,242,788,
2192,548,806,2168,542,464,116,1826,1520,380,332,638,500,
292,316,742,10534,7858,3208,802,562,472,118,2272,568,142,10048,2512,
628,3082,1324,4702,3298,1498,14422,46498,17698,6898,2848,712,178,328,82,1072,268,
1354,838,1948,1162,784,196,298,7672,1918,1732,586,622,254074,183424,45856,11464,
2866,1336,334,892,904,226,346,8614,22252,16204,7762,3172,856,214,10372,2206,
1894,1612,1702,12718,9436,55246,24058,16906,5212,68368,17092,3466,1432,358,6142,4108,
2974,2326,12316,1774,
9722,3908,4772,1130,686,5942,3998,5852,5834,2450,1148,1730,
268,1792,448,112,28,280,70,982,736,184,46,304,76,2836,11638,11584,
2896,724,3574,3250,7864,1966,1000,250,3538,2248,562,2890,13690,9862,14500,3814,
3844,1738,63748,18586,16930,10180,3520,880,220,466,952,238,352,88,22,
10712,2678,1268,1016,254,1208,302,14312,3578,2672,668,3104,776,194,9314,542,
614,494,8282,5318,2258,3158,1448,362,974,3428,2288,572,
412,1336,334,5506,3226,1474,922,610,634,502,4534,2866,4912,1228,1006,2104,
526,2572,1384,346,394,21526,5998,6316,2092,1138,1438,66298,25126,14794,5812,1354,
772,3454,10042,4030,
284,18806,39200,9800,2450,1184,296,74,818,572,824,206,5306,3200,800,200,
50,
1678,3664,916,922,3208,802,1720,430,586,994,3028,1516,550,472,
118,310,382,7852,1738,1642,1588,1090,2182,1084,1192,298,832,208,52,1246,91444,23224,
5806,2098,139558,52600,13150,32188,21784,5446,2308,2236,1342,2560,640,160,40,10,
670,
794,2846,1334,842,4304,1076,2414,1172,6176,1544,386,884,1640,410,28262,12890,
9374,3782,15140,9578,57098,74432,18608,4652,1928,482,938,22010,19838,7706,7322,134690,
76430,28928,7232,1808,452,2180,1280,320,80,20,1004,608,152,38,824,206,
344,86,992,248,62,290,830,578,1526,896,224,56,14,272,68,686,
524,
9874,3970,1756,1162,9064,2266,1096,274,370,406,1612,6154,2122,1864,466,442,
592,148,1000,250,538,2314,1726,2512,628,556,1504,376,94,808,202,1054,
1150,5500,3160,790,1936,484,358,4204,69094,152200,38050,14536,3634,1630,1456,364,
1744,436,664,166,
470,2852,1574,1556,560,140,710,1070,1694,15866,6218,2600,
650,512,128,32,8,2,19694,20798,28502,63296,15824,3956,1010,2366,5174,2954,1376,344,86,
538,796624,199156,128212,55366,16042,14812,3046,1264,316,328,82,718,412,346,
5398,5146,15448,3862,4174,1834,2824,706,7738,14146,15838,6208,1552,388,9238,7576,
1894,4768,1192,298,1528,382,7018,7198,2968,742,778,16594,10006,8062,3292,886,1348,

986,52262,19868,3266,5216,1304,326,392,98,1364,1058,2174,1538,2204,782,692,
1652,1124,7520,1880,470,446,1166,800,200,50,8522,5468,6674,18728,4682,3308,
890,2420,1286,752,188,1796,1484,548,6386,10274,9950,17366,6782,12866,49640,12410,
4778,3362,4118,1814,950,626,2984,746,1094,680,170,770,1718,914,75560,18890,
11300,14732,3032,758,554,2996,45296,11324,23072,5768,1442,2498,836,1634,2660,3176,
794,4244,1868,620,386,1376,344,86,302,2138,2786,3632,908,440,110,10286,
4460,1106,58094,12878,4094,5846,2462,5012,2084,10718,5264,1316,6404,10436,5684,
850,712,178,1264,316,1270,1390,4114,1630,7816,1954,1804,3280,820,424,106,
310,1156,4330,1894,1576,394,418,454,2614,2146,1684,586,490,370,2470,2722,
2128,532,4198,2548,748,886,1174,1336,334,1036,127774,82090,31054,62518,35842,18586,
7240,1810,982,1228,
1616,404,1874,974,1226,2522,1184,296,74,24608,6152,1538,848,212,1028,464,
116,2414,2036,842,3242,6896,1724,8096,2024,506,734,18686,10424,2606,2144,536,
134,25742,15158,14078,5108,1166,1334,5672,1418,6626,2756,788,5168,1292,11486,53066,
52904,13226,28496,7124,2486,3386,5816,1454,1496,374,1604,572,1622,2264,566,1766,

1450,5734,2422,1180,1234,2332,10594,15616,3904,976,244,748,412,1072,268,322,
3418,2602,2788,2122,23716,11296,2824,706,4924,1168,292,1414,802,20962,28738,66088,
16522,9196,1996,646,514,13078,5176,1294,1420,538,982,640,160,40,10,502,
460,358,406,424,106,826,1144,286,556,376,94,280,70,298,
952,238,1900,628,856,214,352,88,22,
596,2294,5084,1226,2330,15290,32624,8156,1802,2816,704,176,44,998,758,3626,
2468,1376,344,86,3536,884,4436,2648,662,1268,14528,3632,908,5894,1874,1736,
434,926,620,1952,488,122,9296,2324,2276,1322,2540,4112,1028,1808,452,1592,
398,422,24461576,6115394,2580716,50438348,7093370,30307994,43751288,10937822,4101956,2193614,822878,308852,
508,826,20230,21346,8278,9796,2110,1870,8890,2632,658,520,130,322,394,4030,
2950,11806,7324,3100,3922,1744,436,1696,424,106,286,844,1654,15856,3964,1798,
3850,1444,544,136,34,2020,652,3598,5866,2128,532,688,172,5488,1372,3112,
778,796,4516,1120,280,70,2140,1174,3706,2554,2068,850,592,148,2614,8566,
68344,17086,10294,23146,6988,4246,7594,4444,61270,45346,17278,10402,4174,
1628,5162,2210,3164,6620,11618,21200,5300,1268,512,128,32,8,2,422,1724,
2030,11480,2870,2300,2912,728,182,788,3668,962,1400,350,1598,4136,1034,662,
1058,3884,1778,980,458,446,494,7106,3992,998,7052,2276,800,200,50,3704,
926,2084,854,1166,1292,1070,5648,1412,8564,1880,470,950,1220,2528,632,158,
1436,7376,1844,620,860,
2218,7834,11314,3610,3538,20956,4204,1072,268,2566,8320,2080,520,130,760,190,
346,4000,1000,250,1516,694,676,3820,1018,2164,

1208,302,5078,2180,3620,6170,4160,1040,260,2822,1334,776,194,2486,284,
5450,3092,2012,1424,356,1460,1100,482,4478,1742,4592,1148,644,2648,662,524,
374,416,104,26,704,176,44,5582,9956,5510,2342,1154,7418,4862,1850,1730,4430,
14816,3704,926,
1324,3106,1294,2404,11566,30268,32374,14452,2986,1396,538,478,7102,6802,149014,243874,
34192,8548,5734,3916,1792,448,112,28,1114,694,4996,1186,66292,12706,4372,1096,
274,496,124,3304,826,586,304,76,712,178,2818,1276,3052,1438,5056,1264,
316,7966,18766,17146,6706,6022,4078,2644,772,592,148,1006,2602,1252,3538,2494,
8614,5536,1384,346,406,33346,9862,6238,26926,35962,13762,4354,1708,2008,502,3592,
898,736,184,46,
1586,872,218,1100,2366,2024,506,1856,464,116,11474,4580,1136,284,920,230,
2072,518,1754,
364,346,3658,2752,688,172,310,394,916,952,238,13660,1840,460,
3398,2444,1526,4586,44726,7838,3218,1898,3428,3374,1544,386,914,2012,656,164,
836,932,998,2426,2384,596,2642,1916,638,518,
334,886,2074,1072,268,3232,808,202,6148,1432,358,2722,1300,1936,484,370,
418,436,550,3514,7714,3172,874,20218,16330,27994,8362,4540,2920,730,694,1912,
478,1786,2542,2128,532,1966,1804,11116,6016,1504,376,94,2434,1192,298,1138,
706,544,136,34,292,
12620,4250,1874,2990,3854,10238,23132,11090,8822,65270,48632,12158,20936,5234,3224,
806,1154,4340,1094,1316,5918,13640,3410,3962,1766,1694,3596,1712,428,896,224,
56,14,
460,556,1132,4672,1168,292,784,196,1960,490,1474,3256,814,586,1828,1216,
304,76,502,7660,3454,1576,394,1666,1510,916,1720,430,442,10258,6472,1618,
1612,718,550,646,1312,328,82,748,2044,664,166,538,2962,2368,592,148,
1396,7822,3214,1486,838,826,12868,8848,2212,1324,15598,6130,4150,4390,1726,928,
232,58,9280,2320,580,2104,526,478,610,4186,17380,5590,3376,844,2728,682,
16900,4372,3178,3292,898,1186,2242,2674,2206,1108,7174,8632,2158,1090,1204,
1304,326,404,818,50210,25076,5798,2456,614,512,128,32,8,2,1340,4490,
3230,2384,596,872,218,902,620,398,4628,2006,1034,1286,764,21860,36980,20078,
6140,48644,62810,27308,5402,4178,166742,8738,33578,19592,4898,
3040,760,190,1408,352,88,22,718,3202,2374,1642,898,1402,808,202,358,
1726,2380,3028,850,832,208,52,292,42658,501352,125338,47284,9148,5200,1300,526,
6334,5296,1324,1078,1312,328,82,670,1906,1030,1246,2392,598,1042,5584,1396,
544,136,34,5128,1282,1564,8764,5038,20212,4072,1018,664,166,3292,17608,
4402,1732,2056,514,1240,310,880,220,1024,256,64,16,4,4012,1834,970,646,
1084,1798,1570,4498,3514,1600,400,100,508,68326,38770,11398,5620,1336,334,2716,

1526,2258,1130,6470,10490,3446,2888,722,554,2174,4604,17294,10436,2240,560,140,
2390,3362,1544,386,428,1688,422,7088,1772,1538,860,950,7736,1934,1796,620,
2516,6602,3812,998,5630,12110,7520,1880,470,1742,
604,1156,4126,4144,1036,478,3982,19048,4762,3388,1804,622,1252,1876,10084,5602,
33706,78484,13312,3328,832,208,52,724,88006,33286,12766,5746,6196,2452,14674,96106,
238864,59716,90922,59044,350446,189712,47428,73426,54226,53698,52984,13246,4222,1684,1162,1306,
1444,2134,1084,2116,13648,3412,2224,556,388,4288,1072,268,334,2038,1048,262,
382,
8318,3404,21098,19154,11486,4592,1148,500,2630,1238,5234,3656,914,1226,2372,1274,
3926,
556,15832,3958,8956,3232,808,202,694,3196,1612,2680,670,1090,1144,286,874,
844,2638,2284,6064,1516,20746,6334,4276,1936,484,376,94,766,8380,3070,2440,
610,514,478,982,5626,1126,2014,1846,4654,6976,1744,436,6040,1510,1978,3088,
772,430,
404,362,422,1064,266,386,10694,8288,2072,518,3404,1442,1646,2522,1232,308,
344,86,764,1682,974,5624,1406,2546,6626,12428,4376,1094,1946,1016,254,1574,
3188,884,452,1136,284,6398,6758,3674,1664,416,104,26,296,74,314,1538,
2816,704,176,44,728,182,818,
4612,2014,1042,1264,316,346,1654,1012,87658,113272,28318,10906,10564,3688,922,2140,
688,172,526,484,3118,1456,364,1228,13642,29680,7420,1678,916,1210,2074,3112,
778,22000,5500,1318,2680,670,538,1816,454,
2426,2084,2246,1130,1304,326,410,950,644,4406,1940,5540,3704,926,764,746,
1142,716,422,446,1358,1616,404,10724,4706,8294,3398,1562,1598,93806,61214,17720,
4430,2912,728,182,356,1448,362,980,1034,5180,1232,308,806,590,1292,530,
1814,968,242,1466,1544,386,7016,1754,1706,
4162,2242,23602,11002,4414,9424,2356,730,562,1282,7564,2848,712,178,1120,
280,70,760,190,7078,4702,6508,5674,2416,604,1624,406,1000,250,382,976,244,
334,2578,10090,4072,1018,670,3190,3550,8410,3442,1720,430,1732,748,1768,442,
454,12262,7618,5836,2362,1174,1324,1108,496,124,1342,5050,2182,1948,7888,1972,
658,2272,568,142,17824,4456,1114,706,9994,4036,1072,268,796,8590,29434,11326,
44068,28030,85810,37246,112054,82000,20500,4132,
1406,1514,932,464,116,1094,2012,1256,314,2774,18254,13088,3272,818,596,590,
1910,11450,5792,1448,362,608,152,38,938,770,578,506,1262,1364,698,2234,
6374,6752,1688,422,1730,1850,2450,1208,302,1802,1076,2984,746,716,1676,
1252,7804,15604,53002,30538,17902,5542,2368,592,148,766,2350,1168,292,2194,4138,
3052,862,1414,820,1006,790,586,1054,1348,11206,4492,1132,502,478,
-4246,-12376,-3094,-3862,-5806,-8236,-5158,-4726,-6778,-4438,1298,2366,1178,2072,518,3590,
6506,21566,8378,8450,5480,1370,7424,1856,464,116,1430,974,656,164,3530,6830,
2852,2126,1088,272,68,746,21998,8540,1892,2096,524,3878,2690,2240,560,140,
1916,650,4310,2288,572,398,440,110,332,1124,1934,1016,254,386,944,236,
542,494,476,380,362,8684,1730,1700,31580,6212,2474,8252,1838,980,8876,4346,
5048,1262,764,434,1082,2294,1154,1376,344,86,5858,4022,1640,410,1586,2420,
2402,2078,1070,692,3662,1664,416,104,26,
574,7114,3334,6586,2362,1174,2374,9652,4534,4198,20986,6412,6424,1606,4894,2902,
3832,958,20194,7864,1966,1834,7558,11932,4084,1084,1066,9988,2164,814,1186,736,
184,46,754,
2480,620,5534,14360,3590,2750,26960,6740,1556,584,146,1142,1322,788,440,110,
2024,506,482,5048,1262,2132,692,422,968,242,3344,836,764,2858,1364,
548,5750,3266,1430,6260,1466,842,608,152,38,752,188,512,128,32,8,2,
320,80,20,296,74,
6664,1666,3448,862,616,154,5404,1306,6340,1738,3946,4720,1180,514,3304,826,
3424,856,214,2020,1300,1414,910,634,41680,10420,20920,5230,2254,1138,1372,550,
1624,406,3142,1396,3262,1516,4918,3136,784,196,
518,488,122,896,224,56,14,2936,734,3164,1874,20702,20066,18326,7166,4088,
1022,1496,374,434,780536,195134,62834,40154,61418,35282,
13924,1906,1918,3016,754,11734,7336,1834,982,1288,322,2098,23920,5980,
11818,4726,3394,4042,1810,1024,256,64,16,4,394,442,460,2536,634,532,916,466,
646,1972,664,166,15814,17650,324748,530488,132622,1462150,926830,1175410,373222,178822,114724,16648,
4162,4528,1132,1054,3472,868,772,3502,44974,76408,19102,20440,5110,3610,1648,412,
610,1324,1108,502,1018,676,1432,358,1042,808,202,370,
308,560,140,6194,2618,5732,1370,902,5606,9494,13814,13058,5192,1298,782,1178,
848,212,3284,24560,6140,2144,536,134,4148,1100,4220,3548,1736,434,458,23636,
6056,1514,1478,15812,3260,2600,650,2312,578,512,128,32,8,2,296,74,
5120,1280,320,80,20,7226,3788,4796,3086,2474,2114,1088,272,68,4634,
1820,1250,764,1010,674,548,398,962,656,164,326,7064,1766,
304,76,310,412,2050,7792,1948,1408,352,88,22,3904,976,244,808,
202,1570,4390,1942,1024,256,64,16,4,
932,1004,2228,7316,4496,1124,1058,2246,1160,290,1760,440,110,338,2798,1346,
6008,1502,860,458,1796,1232,308,2606,1274,6332,1484,728,182,
550,1876,784,196,334,6544,1636,604,982,3658,3874,1750,4630,15376,3844,1018,
8086,9784,2446,1918,1822,1768,442,1264,316,832,208,52,1930,4684,3388,1696,
424,106,11002,5680,1420,650980,122356,35608,8902,85792,21448,5362,2308,730,6088,1522,
868,460,1606,3856,964,478,1012,
302,7058,3566,19478,11702,7328,1832,458,470,1010,806,3440,860,11432,2858,1370,
812,974,3656,914,1622,1658,920,230,1730,7400,1850,992,248,62,1400,350,
1712,428,866,2468,950,1280,320,80,20,
1792,448,112,28,304,76,8272,2068,3736,934,6166,3286,1384,346,1582,892,
466,1882,2554,3574,1528,382,442,9658,9568,2392,598,1666,1684,30952,7738,7948,
4438,1438,838,2986,22366,8686,3556,5734,3502,1612,1366,11188,3976,994,1306,
1466,1574,890,1250,6326,2672,668,3158,1484,578,2306,5354,32192,8048,
2012,3842,7298,11672,2918,1394,2600,650,1136,284,10862,7100,1442,12152,3038,1334,
800,200,50,848,212,3374,2510,3518,1514,6488,1622,908,470,476,1190,746,11960,2990,
2348,740,1736,434,1790,1028,3086,11420,37916,32084,11744,2936,734,

1852,55654,32056,8014,8188,6016,1504,376,94,4138,1150,59866,22750,35662,31516,
14722,4666,2050,1102,2356,742,1168,292,4462,10186,4120,1030,1330,7684,1606,1654,
28924,36430,32164,4954,2158,16288,4072,1018,682,556,11644,9808,2452,760,190,2680,670,
8242,59098,22462,30868,6088,1522,2896,724,436,382,7474,10294,5206,11752,2938,1402,
826,610,6388,1498,862,5596,6226,4930,1912,478,6610,3208,802,2014,14560,3640,
910,2194,2446,3490,2236,6082,3418,1582,3100,2734,1714,7540,3868,3058,4282,1906,
9418,3832,958,3652,2290,3382,5434,2338,1246,5044,1390,5812,1534,3586,1750,4354,
1966,2614,2038,2770,4516,2524,2722,3172,3748,
314,2138,1994,1088,272,68,1976,494,1736,434,464,116,872,218,1184,296,
74,548,404,584,146,356,368,92,8324,1862,3002,5072,1268,3812,1016,254,
896,224,56,14,4082,1832,458,656,164,332,6026,2222,50792,12698,5138,2228,
1562,
2854,1372,2650,3280,820,9778,11422,21388,4312,1078,706,3430,1588,3460,25678,
7750,3208,802,2110,1984,496,124,1120,280,70,328,82,3730,87970,75658,43312,10828,
2332,856,214,382,1234,6322,12514,11992,2998,1426,5824,1456,364,370,2920,730,
4918,2146,3244,910,784,196,1516,586,1084,2758,1336,334,622,2416,604,1444,
5350,2308,1882,2794,2326,1174,742,580,1678,1000,250,7132,1450,1570,12502,4990,
7834,
470,662,716,3566,1640,410,1784,446,338,5024,1256,314,1580,752,188,
1438,2194,1126,3220,6454,6886,15532,6298,2302,5650,2422,3484,1738,3052,2728,682,
55162,9556,5326,3754,5968,1492,1414,15796,2752,688,172,
530,2294,3068,12788,2702,3098,1466,854,2150,1970,1934,2612,794,602,5588,1352,
338,10610,5582,6068,1442,938,656,164,3320,830,
-4070,15430,6244,2518,1930,3076,10024,2506,3562,8962,9214,3760,940,1282,2356,3280,
820,2218,2794,18466,35296,8824,2206,1132,2320,580,6082,3442,2698,3724,1768,442,
4858,1780,13606,4360,1090,1336,334,430,466,1024,256,64,16,4,4696,1174,
1600,400,100,790,1438,844,652,2410,4678,2842,7594,6196,42766,16342,6304,1576,
394,
1724,1472,368,92,548,11336,2834,3950,1646,998,680,170,860,656,164,2588,
980,1040,260,1562,1538,2750,48596,14432,3608,902,644,37988,30374,11696,2924,854,
626,8420,31832,7958,3290,2006,1058,27698,109472,27368,6842,5954,6476,1520,380,10328,
2582,1274,10472,2618,6776,1694,7748,7370,4910,1916,
1558,1642,922,652,1018,688,172,814,5584,1396,568,142,2668,1516,1192,298,
418,2236,2398,3478,2722,3694,50014,43654,17392,4348,2386,20164,10216,2554,1264,316,
1588,604,4612,2638,4654,12874,5134,8986,3676,7528,1882,1012,496,124,2152,538,
508,526,3154,3856,964,2278,3988,1054,2344,586,
950,9050,6662,10928,2732,2612,986,5162,8174,5366,80492,26870,63578,125966,71624,17906,
7022,4718,3422,3386,1490,866,632,158,
352,88,22,316,2068,3076,3040,760,190,592,148,916,1078,712,178,1612,
610,33292,6550,2764,826,1234,6562,16516,12952,3238,1522,2746,2314,2698,7120,1780,
1270,784,196,12148,4186,3124,1648,412,2914,22348,4498,12394,9478,3862,1756,1486,
4690,4372,1474,4366,4744,1186,6310,2674,3718,1702,946,2260,2350,1888,472,118,
646,550,514,4906,13978,8632,2158,2026,3346,5590,2404,2476,772,4132,17494,6868,
3808,952,238,1216,304,76,322,2908,8506,5554,6148,6508,1528,382,
512,128,32,8,2,2708,3494,3824,956,488,122,2306,4958,2168,542,1532,
596,1718,1844,5822,2492,776,194,872,218,20828,4214,3332,42866,24884,27692,20312,
5078,5276,1298,1502,10682,16028,3314,2636,992,248,62,332,326,632,158,
368,92,42272,10568,2642,2258,2042,1874,1826,1658,3764,17972,43406,16586,47072,11768,2942,
1412,17072,4268,3338,4556,5498,1538,8378,13112,3278,
382,988,11248,2812,1564,3526,4444,2596,796,1102,1354,922,1510,9610,3244,84856,
21214,12706,5074,2212,724,2554,6208,1552,388,
-9850,-27958,-10174,-49396,-58144,-14536,-3634,-89194,728,182,878,3632,908,8006,10382,16448,
4112,1028,3794,1610,914,800,200,50,1490,962,2606,7322,3056,764,1796,6548,
1538,4766,16430,20564,4166,3590,3920,980,494,3146,998,4892,16214,9896,2474,1238,
1472,368,92,3068,2768,692,440,110,2660,1646,4604,3416,854,1256,314,428,
896,224,56,14,4118,3092,890,644,3326,4280,1070,12182,7628,2186,1130,734,
1880,470,1040,260,8492,3164,5864,1466,860,7034,2948,2930,4796,2510,16070,
20834,9914,4028,2690,55436,22130,9980,5684,1376,344,86,824,206,
544,136,34,796,460,2146,1984,496,124,334,436,1660,622,
16520,4130,7760,1940,2270,1184,296,74,3296,824,206,8732,2972,2756,7124,6086,
2594,5816,1454,2192,548,1712,428,392,98,974,8894,3326,3980,1058,3872,968,
242,2318,2108,842,3242,2264,566,524,410,1010,3404,950,668,17642,6566,2774,
1352,338,1766,572,626,5240,1310,914,2252,734,752,188,
2656,664,166,874,640,160,40,10,316,2086,1954,1096,274,24418,7414,9838,9784,
2446,6148,2368,592,148,340,376,94,4474,1990,1900,2260,736,184,46,
1522,1774,2980,12292,3340,1720,430,1846,
944,236,6992,1748,794,3026,1448,362,650,8318,5462,9458,3860,2810,2054,2360,
590,12860,4400,1100,1952,488,122,13940,4076,8000,2000,500,1244,4430,19772,6344,
1586,908,2888,722,584,146,368,92,920,230,1682,
2788,6784,1696,424,106,844,472,118,358,448,112,28,4234,3166,22102,8602,
3712,928,232,58,4012,1066,1384,346,1048,262,412,
818,1250,1490,2276,4640,1160,290,950,3032,758,764,458,4316,1124,1142,872,
218,1574,9158,9350,6272,1568,392,98,842,584,146,56150,12572,2672,668,440,
110,356,980,5192,1298,3356,944,236,1292,5108,3650,2840,710,4028,1070,716,
476,404,6242,4298,14990,5936,1484,1454,860,
6052,1450,9598,11938,4792,1198,1462,6106,1828,658,562,526,1084,1864,466,490,
796,1012,694,7834,16012,12694,12208,3052,2404,766,7168,1792,448,112,28,
334,976,244,586,1390,1570,904,226,400,100,1714,958,2026,7858,3262,26788,5338,
10300,4252,1984,496,124,13096,3274,2524,1498,3352,838,3622,99724,65668,12628,4834,
2128,532,2200,550,28894,1054,2308,748,4324,1126,7870,53680,13420,8842,3970,1804,
4954,1774,1786,52438,45742,26518,23872,5968,1492,9940,6520,1630,1594,1000,250,622,
1138,742,5566,2728,682,1936,484,406,1840,460,4594,2038,453982,192430,109030,211144,
52786,20110,12100,2584,646,32296,8074,34114,13108,16582,23548,
3152,788,464,116,338,2234,1154,878,3314,3416,854,44402,30134,13622,6656,
1664,416,104,26,326,974,2324,752,188,3578,1658,938,668,1784,446,3134,
6536,1634,1076,518,1082,722,15878,9722,3962,1802,992,248,62,2648,662,1238,9014,
4712,1178,758,1202,13988,2858,1388,21602,5288,1322,812,5414,3836,4064,1016,254,
4772,4124,3242,1532,1022,6332,7952,1988,18956,6122,2612,806,1244,8102,5348,3728,
932,
1324,2458,13582,5410,4384,1096,274,946,1276,556,1978,10072,2518,19504,4876,1240,
310,5212,1294,802,1954,1618,1702,10504,2626,23626,16396,2860,2944,736,184,46,
334,442,2890,3274,11476,6346,10720,2680,670,568,142,370,1000,250,6382,2710,
3754,4672,1168,292,874,2242,2950,1384,346,4834,7750,2734,1342,820,6130,4240,
1060,1090,808,202,3436,3250,2620,1576,394,11152,2788,3058,2512,628,1762,1654,
1846,4888,1222,898,1348,5644,1510,
938,1322,1538,2396,1568,392,98,1592,398,668,650,1160,290,1754,2798,4580,
5480,1370,2234,1856,464,116,1028,4292,3320,830,1502,2996,2636,812,470,494,
2126,1154,2180,2540,794,4610,61694,20702,15146,9314,9368,2342,1196,542,22328,5582,

814,3616,904,226,8962,7720,1930,1042,850,796,30550,17980,5674,2446,16072,4018,
6856,1714,4954,2176,544,136,34,1168,292,598,1132,1114,736,184,46,2644,
1012,508,1726,2968,742,1228,1174,1456,364,898,1840,460,
1238,2240,560,140,5684,1358,1562,998,3212,13766,30344,7586,3164,1688,422,
3128,782,332,2804,1034,15548,95954,36302,21218,8276,4064,1016,254,1088,272,68,494,
1076,710,5558,6206,3536,884,2060,19994,6182,10418,4226,1904,476,932,
1246,910,3568,892,1570,9256,2314,2692,6772,2704,676,1804,658,2074,1966,8230,
3406,2596,2614,1300,2110,35500,6976,1744,436,922,1318,814,4180,4558,3082,20890,
12550,5026,4972,1252,1522,2422,1228,550,526,8554,4528,1132,532,1720,430,4852,
2164,1408,352,88,22,328,82,1588,4396,1144,286,640,160,40,10,
2072,518,1040,260,7418,54626,36272,9068,4934,11630,4682,5474,5168,1292,878,650,
956,500,37874,22106,30584,7646,3188,7256,1814,1928,482,3062,15032,3758,1730,1652,
5798,2192,548,1154,1904,476,410,13970,8660,6626,7436,1526,17948,3686,1598,920,
230,626,
1024,256,64,16,4,322,442,5446,4912,1228,2044,1378,838,1996,2368,592,
148,3988,8362,2914,1414,3862,7498,3808,952,238,
2198,2042,1088,272,68,2096,524,1100,2060,3170,8054,5336,1334,1556,614,6470,
3656,914,938,674,
862,646,32020,60550,311002,2156074,4097428,2595526,1233742,462976,115744,28936,7234,4876,8482,5578,
9682,56974,21688,5422,2356,2218,8314,8548,21814,6700,5290,8608,2152,538,11140,3940,
1642,8860,1984,496,124,346,2860,1048,262,3688,922,2056,514,1096,274,1888,
472,118,598,2770,5524,6118,3136,784,196,
-162202,-60502,-54526,-91768,-22942,-376996,-58438,-32062,-37948,-1211152,-302788,-31186,-343642,-128542,12542,
4094,1718,968,242,1742,6308,17456,4364,1142,752,188,14072,3518,1556,1268,1166,2822,
1382,842,1286,806,626,2066,1328,332,386,13082,8168,2042,1958,1058,6278,2678,
3002,2498,5792,1448,362,3716,4982,2192,548,1646,1868,674,7052,2258,2906,2444,
782,8492,1916,836,8252,1538,14216,3554,87926,33296,8324,7898,5252,5954,10166,4136,
1034,
346,454,1066,724,460,940,2020,4414,6490,2758,2362,1210,778,616,154,382,
3118,16564,3430,2740,838,1282,928,232,58,1480,370,6034,3754,1732,2386,2182,
2038,1792,448,112,28,1552,388,622,1540,784,196,3358,27742,85738,32476,
16600,4150,3196,4396,7816,1954,1162,760,190,3478,14782,64552,16138,6376,1594,922,670,
5548,5746,165496,41374,82822,47398,27472,6868,1612,1264,316,4576,1144,286,6232,1558,

2048,512,128,32,8,2,326,1820,1568,392,98,362,590,1184,296,74,
410,1352,338,452,644,446,1064,266,1604,626,560,140,788,680,170,1508,
608,152,38,866,650,752,188,1280,320,80,20,572,974,1346,830,
4222,2962,9550,3256,814,2746,26686,11674,9118,6226,18700,3832,958,38350,11356,2446,
1258,1522,3922,17938,9430,3862,1774,2842,133606,50428,11818,7462,3124,2932,1492,1234,

818,3806,1754,3032,758,1700,1298,1442,1628,632,158,386,1034,6272,1568,
392,98,872,218,1736,434,15254,4862,2150,3464,866,1304,326,1322,4328,1082,
3590,2090,5300,3788,3302,5534,2402,2168,542,530,1226,64106,142946,81224,20306,9506,
6164,10160,2540,1862,1970,11618,7352,1838,1016,254,422,22310,75770,37406,14354,44174,
16892,3494,28376,7094,2252,2816,704,176,44,578,1142,4808,1202,6434,4436,5462,
2108,722,1244,560,140,1214,782,620,11204,3968,992,248,62,350,458,21980,
4448,1112,278,650,4484,2078,1106,1406,854,812,686,584,146,1784,446,494,
512,128,32,8,2,
934,3208,802,628,1744,436,634,2344,586,9916,4876,8944,2236,2446,2194,1150,
1426,862,2284,2518,2848,712,178,394,2356,904,226,412,538,724,3814,
7486,23182,13858,5524,3334,10168,2542,2248,562,670,11698,4714,4390,10060,7096,1774,
1816,454,28870,133846,129616,32404,56668,16756,2524,1528,382,1102,1438,4300,5380,1336,
334,1006,1384,346,
1520,380,11372,5342,9428,2096,524,968,242,1292,1184,296,74,356,1286,
1544,386,
1504,376,94,364,3676,1018,6268,1012,5296,1324,1432,358,676,1552,388,1918,
1048,262,
3026,6440,1610,1730,4322,12854,5150,3368,842,1298,9950,8330,5510,2396,914,3836,
1778,7724,6266,7256,1814,1010,8492,1922,3188,131168,32792,8198,3404,968,242,4808,
1202,11774,14690,38018,33644,6638,2444,788,1046,722,10334,4496,1124,2450,5780,
5576,1394,2882,3998,10640,2660,3458,4484,3530,2810,7238,3044,5798,2504,626,10910,4970,
3620,4106,3134,4502,2018,8696,2174,5078,2234,5942,2558,55352,13838,5852,1400,350,
5960,1490,6428,6536,1634,7400,1850,4430,8876,1994,1946,2066,5294,2210,4916,3098,
2426,2498,3674,2714,2750,3422,5564,3038,3146,2594,3236,3854,3908,3470,3524,3956,
4340,4118,1874,4604,4988,
838,14284,6274,3844,2008,502,1108,538,532,430,28864,7216,1804,1330,
952,238,13480,3370,1594,928,232,58,352,88,22,2356,772,1360,340,394,478,1972,
700,1864,466,862,2296,574,1870,5050,2224,556,982,1378,2998,2512,628,448,
112,28,6994,4426,1990,1672,418,3916,6046,6670,8674,176986,66700,17722,6976,1744,
436,412,2944,736,184,46,
19304,4826,1784,446,2042,1154,764,12824,3206,4376,1094,4076,2432,608,152,
38,6992,1748,776,194,404,1286,7226,2612,7964,3068,9044,4994,2204,1448,362,13124,
2792,698,17198,10502,14438,31778,12248,3062,2918,9908,
1132,544,136,34,108052,23746,37672,9418,3352,838,646,574,742,610,7054,7708,
11122,10960,2740,1600,400,100,1618,4138,5758,2200,550,538,5290,5110,2248,562,
2050,898,3832,958,850,39796,12022,4840,1210,1510,2056,514,3346,4360,1090,3388,
2626,4846,5182,2038,1096,274,12136,3034,2536,634,1186,3334,1582,1870,4318,1678,
5128,1282,3274,1894,1042,
1742,986,6260,8330,19328,4832,1208,302,446,500,3020,1088,272,68,11138,8816,
2204,746,2210,23756,5048,1262,806,
586,748,3892,2920,730,1516,22378,8470,18046,10984,2746,19138,7510,18652,7672,
1918,1912,478,1102,2434,1246,1534,1696,424,106,928,232,58,2182,3424,856,
214,3934,3046,3448,862,1318,3232,808,202,640,160,40,10,1180,3298,1570,922,
10102,9298,3820,3466,1558,11362,4594,2056,514,526,4396,20110,9442,3874,1786,53644,
24214,73288,18322,7204,1684,820,1360,340,2260,1090,742,1990,3262,2668,721228,1478434,
554746,1344028,284464,71116,24022,57082,261514,74134,737446,1503580,716602,455620,85762,32494,
1226,794,632,158,2522,1280,320,80,20,338,680,170,398,28856,7214,
11846,9272,2318,16076,4352,1088,272,68,2306,4898,3278,50954,19442,4874,2162,1256,314,
452,3818,1766,1706,974,8138,3386,1604,1550,11360,2840,710,
16300,2878,1414,1810,1726,982,862,658,1240,310,1594,2536,634,5176,1294,820,
1936,484,3232,808,202,4798,2134,1186,1504,376,94,370,12574,5050,14686,5842,
4426,15256,3814,11116,
344,86,368,92,5768,1442,9278,4436,2978,29096,7274,4034,12086,4868,48536,12134,
4886,2168,542,740,1766,998,710,602,1178,1502,1010,1964,704,176,44,
1664,416,104,26,854,656,164,3986,4958,1982,20348,11546,7334,3086,8360,2090,3710,
10142,3440,860,
6388,1534,11356,28852,5746,5134,26638,32632,8158,6286,5512,1378,976,244,382,9394,
5182,14272,3568,892,36142,32092,15136,3784,946,1618,33712,8428,3676,3148,1726,2542,
3742,7468,4156,5362,2002,20104,5026,10858,4408,1102,14854,9196,4696,1174,1462,5668,
3958,8422,5578,2428,6478,13516,4642,1894,1906,5506,3022,6106,2626,
368,92,1880,470,9356,9194,3176,794,8306,3452,1814,5036,21236,5702,23990,332114,
124880,31220,7808,1952,488,122,1274,1760,440,110,1016,254,986,15746,6242,2678,
17054,10436,2294,10076,4244,2618,2240,560,140,2624,656,164,5120,1280,320,80,20,782,4148,
6848,1712,428,29822,17618,6944,1736,434,500,1328,332,1742,2894,
746,800,200,50,356,404,14918,15434,48902,49064,12266,4040,1010,716,1904,476,
1070,10556,3812,1052,3524,998,2444,2312,578,554,
26662,10336,2584,646,580,892,6166,2650,8032,2008,502,526,5602,5086,3370,2740,
2278,1192,298,1012,8194,8518,3532,1000,250,820,1144,286,3874,13024,3256,814,
1594,2440,610,2092,730,9850,9622,3946,3064,766,2332,1108,1156,1426,5962,4198,
1912,478,4360,1090,2524,946,6250,
644,1028,1136,284,392,98,902,4466,2858,27794,19388,3974,7382,7724,1598,938,
6248,1562,2534,2912,728,182,17912,4478,2018,1982,1082,2522,3434,87896,21974,45614,
17444,5828,2486,1292,3506,56792,14198,4586,890552,222638,83828,36974,14204,3002,4142,1892,
3926,2756,1622,11216,2804,2792,698,2198,1274,2684,842,3818,
1234,802,640,160,40,10,352,88,22,1630,12646,146944,36736,9184,2296,
574,8920,2230,3472,868,502,18640,4660,1276,2206,1906,1054,1420,4960,1240,310,
1744,436,1528,382,2044,2176,544,136,34,1990,8224,2056,514,532,1342,6814,3850,
2854,9892,2194,1162,1720,430,1090,748,3016,754,622,1198,1522,910,1360,340,
6004,1438,1582,1738,4924,2014,1708,2332,1504,376,94,856,214,
1792,448,112,28,610,568,142,928,232,58,412,964,520,130,388,988,1126,15724,22906,
7036,6382,4438,5356,16594,6562,2800,700,13672,3418,10378,5608,1402,
866,3032,758,1298,1676,1322,836,4130,1658,962,1898,1052,2060,1430,11996,5348,
6164,1496,374,1136,284,1736,434,1982,8864,2216,554,548,1352,338,1376,344,
86,1862,
988,526,538,25414,7744,1936,484,436,7702,10942,4444,1174,4792,1198,790,
13858,6826,7378,5002,4720,1180,562,1168,292,934,1960,490,2032,508,25198,9790,4012,
2938,5206,5488,1372,598,2572,958,700,472,118,1228,4516,2122,3856,964,3094,
6568,1642,3004,904,226,
6890,4730,2978,4136,1034,1436,800,200,50,2840,710,608,152,38,
356,3002,13046,5234,180026,58040,14510,3230,4244,2048,512,128,32,8,2,446,1412,
2006,1094,752,188,3140,2948,2492,17906,46742,17870,5624,1406,1832,458,1112,278,2654,
12020,3518,2384,596,1022,1670,968,242,
424,106,382,1948,9886,14176,3544,886,1354,850,838,2422,2218,1174,1516,1282,
4864,1216,304,76,1000,250,436,
1094,15716,3290,1526,2918,6482,2774,19604,12962,5204,2342,4658,2090,2126,2054,8426,
5036,4046,3134,5132,9398,9560,2390,4064,1016,254,
2842,2458,2242,13528,3382,1612,646,586,12556,2698,5644,1402,1648,412,6328,1582,
3214,2602,2086,1126,766,13588,9532,1942,1072,268,394,
10118,4742,7640,1910,3428,1826,3770,17900,34550,14150,3782,4238,1934,1070,746,9578,
7634,5156,2312,578,1298,1592,398,494,530,1160,290,1856,464,116,368,92,
362,1802,3158,2582,1784,446,512,128,32,8,2,992,248,62,
436,3886,2632,658,592,148,814,1336,334,20086,64528,16132,3370,1552,388,418,
502,5506,2410,1282,826,1600,400,100,364,46120,11530,8404,1786,1732,670,1240,
310,28834,11158,19906,7810,3274,1462,11338,3190,8302,5920,1480,370,484,
1052,46574,92984,23246,32234,12434,23918,37826,13256,3314,1538,1904,476,5018,2228,
764,4964,1304,326,1196,1202,944,236,932,1754,1004,1148,41954,28778,11138,5954,
14498,232592,58148,16466,4274,1808,452,2372,9458,3266,8096,2024,506,536,134,
5782,4108,3532,2002,8362,31018,324076,46180,10738,4492,7552,1888,472,118,640,160,
40,10,2830,1408,352,88,22,1192,298,21970,18580,11278,4576,1144,286,454,
4126,1894,2056,514,1156,2182,7744,1936,484,8500,6754,4666,5584,1396,2236,766,
634,
356,1802,1760,440,110,1328,332,410,1100,554,2198,1172,1310,17102,12020,4250,
3260,1148,770,3800,950,704,176,44,8822,3656,914,9002,7544,1886,1202,2666,
50132,26912,6728,1682,2336,584,146,10562,43814,16778,8078,17408,4352,1088,272,68,
2984,746,3218,6824,1706,
1888,472,118,1780,682,604,610,934,1396,2836,880,220,502,1258,820,892,
3394,1564,2314,1216,304,76,2152,538,550,1180,1132,1240,310,1402,874,676,
1648,412,1828,2752,688,172,556,2026,1108,712,178,3880,970,1096,274,1378,
1744,436,430,2512,628,466,772,718,2260,
17162,5438,3932,6068,2546,1304,326,1934,1820,1388,3716,1046,15704,3926,33362,12860,
4490,1874,1052,1226,956,1142,16262,15380,2774,9872,2468,812,8414,5606,4814,10520,
2630,3878,9980,3680,920,230,404,668,1208,302,11492,2504,626,584,146,
1042,11500,2506,2284,778,1312,328,82,4768,1192,298,3526,1672,418,2014,1138,
4282,2812,2968,742,628,1480,370,3310,1750,1006,6208,1552,388,4750,1948,886,
682,1258,1582,1942,1078,754,3796,2230,1186,2662,1348,2320,580,1906,5254,382,
2482,6316,1534,1786,2752,688,172,1912,478,2554,1084,6712,1678,994,2500,2716,
2758,1384,346,2428,1780,6064,1516,634,3622,1708,670,1102,922,4012,1264,316,
5236,2110,2158,3292,1156,2164,1462,898,


2042,11210,119948,46508,7154,23234,13946,43322,22112,5528,1382,22910,8942,3704,926,698,
26558,10310,17078,3752,938,235778,133502,50414,19256,4814,2156,5918,2570,22262,16136,4034,
3146,10598,14162,5588,6386,9170,9896,2474,18320,4580,8330,31010,11372,13028,3338,87872,
21968,5492,19634,14288,3572,9332,4850,
436,676,478,3604,20074,9742,6358,5626,4396,27364,5482,3586,1696,424,106,
1318,4522,2404,802,652,468382,298264,74566,140518,135874,51304,12826,4222,4018,1858,1048,
262,28822,394978,148468,19408,4852,1324,6022,24448,6112,1528,382,5818,10894,7006,15052,
22558,9694,12352,3088,772,496,124,1036,10486,10516,8734,5896,1474,904,226,
1382,1658,974,21530,8426,3512,878,2414,3710,13766,8624,2156,6626,2480,620,8312,
2078,5492,992,248,62,28334,25580,7826,7220,1706,10028,3128,782,2102,8084,1868,
1406,11324,1334,10838,3758,4844,3404,1838,3224,806,1166,51824,12956,8912,2228,770,

370,1090,1474,1636,1342,856,214,2422,6058,3112,778,2332,790,1612,844,736,
184,46,2008,502,6706,4654,2098,2062,1126,934,880,220,394,
1406,9782,4022,1862,1052,3248,812,506,4994,5894,2564,2762,2438,1268,17504,4376,
1094,764,2036,3458,4598,2078,3104,776,194,1844,2276,10592,2648,662,602,1334,
854,674,5438,8354,37808,9452,2126,3734,1754,3752,938,1412,1226,1574,944,236,
398,902,692,
-3602,556,1042,3436,1852,2464,616,154,412,8224,2056,514,1480,370,724,490,
538,400,100,634,592,148,382,1858,2068,742,14056,3514,1672,418,13264,3316,
976,244,1978,1096,274,1012,544,136,34,2302,3262,21850,8548,1822,3220,958,
3688,922,700,5488,1372,5974,4246,3274,1582,9520,2380,3850,1798,8662,5758,5260,
2128,532,454,1210,808,202,430,1048,262,14008,3502,11320,2830,6460,4408,1102,
21742,597694,272392,68098,22864,5716,1426,1120,280,70,3148,2878,8620,3310,50044,26530,
14656,3664,916,526,3544,886,1384,346,484,688,172,934,12994,6766,20326,59758,
177532,65632,16408,4102,2416,604,4288,1072,268,5218,8728,2182,4336,1084,2140,
422,5486,3974,7916,37364,5876,1448,362,2516,6890,8366,5594,18098,7142,41936,10484,
2096,524,3218,1562,3344,836,512,128,32,8,2,356,1382,11318,8432,2108,
1466,1034,1724,1394,878,
640,160,40,10,1126,778,4000,1000,250,1030,742,634,1246,1984,496,124,
213736,53434,30946,324058,183172,118804,19918,34402,105358,68962,230134,86656,21664,5416,1354,1594,
1786,1894,1066,14716,2692,4594,5566,2188,766,838,670,964,13504,3376,844,514,
18418,17230,20146,18688,4672,1168,292,2998,1480,370,2002,2890,2242,5728,1432,358,
490,2200,550,562,2164,1498,1732,7750,3262,1540,8212,2422,1264,316,856,214,
436,1012,1174,796,2542,2362,2218,5296,1324,604,40096,10024,2506,2080,520,130,

2594,2120,530,1190,1076,5726,2504,626,1244,590,578,5510,2174,1172,13016,3254,
2666,3944,986,18542,7310,3098,10586,28526,11054,4502,29054,11252,6260,6860,4376,1094,
932,1154,3578,4802,4934,2012,734,632,158,416,104,26,4754,3566,1694,992,
248,62,380,428,2432,608,152,38,15440,3860,12974,5222,19334,6062,2630,1364,
2270,1208,302,470,
3862,28996,5794,2530,1306,1846,13150,8290,3466,1600,400,100,376,94,946,712,
178,424,106,1630,1810,1036,2134,51976,12994,5230,12610,5086,3754,1618,964,538,
1522,928,232,58,
2510,151544,37886,33668,23570,7256,1814,1916,27512,6878,12278,7802,3284,974,15686,
1114,2644,4588,6088,1522,12346,45292,20626,41686,12352,3088,772,13498,82024,20506,19006,
7486,3166,1546,7666,796444,149692,28426,58696,14674,7222,3544,886,3184,796,508,454,
1492,20518,16078,6388,3658,17872,4468,18358,4702,2122,
764,17870,6992,1748,1412,22244,10394,6746,4694,2120,530,2156,1778,7124,5990,2606,
5360,1340,818,1844,1418,27860,7628,1790,2174,3212,962,12122,7718,3254,1580,656,
164,2102,1148,72464,18116,11150,6008,1502,1052,1526,932,
8902,5908,1468,3856,964,766,5014,20110,33232,8308,1918,8392,2098,14518,8686,
9040,2260,784,196,658,66250,25204,5086,9364,2116,928,232,58,382,5476,2206,
11362,3826,2920,730,634,598,1288,322,1036,1192,298,472,118,2290,2272,568,142,
4648,1162,796,11602,7606,37282,11116,10876,22972,17464,4366,6970,2974,8428,32206,22024,
5506,3352,838,1372,14224,3556,2056,514,21550,19894,103456,25864,6466,2008,502,
392,98,398,15536,3884,4406,20054,28316,34904,8726,87122,33032,8258,3458,1658,1868,
2504,626,596,716,2018,1118,1532,1334,11306,3812,1076,2666,1382,2882,1442,902,
8552,2138,7652,1796,698,1604,662,8012,5096,1274,9704,2426,3278,15194,18272,4568,
1142,6932,3326,2774,6446,3758,2624,656,164,72056,18014,11036,13106,5276,5744,1436,

1990,1108,1216,304,76,376,94,5482,3988,2026,2044,52858,26890,16030,8074,
5446,2404,87850,50320,12580,10900,3970,5068,1312,328,82,2644,1648,412,880,220,
664,166,424,106,964,5236,8956,12520,3130,11800,2950,1468,2728,682,1288,322,
1934,1088,272,68,926,710,7172,2924,1046,1952,488,122,1826,794,3062,1496,
374,740,1262,836,1142,956,542,566,
-234842,-1671734,-703946,-2522378,-1195538,-671582,-251480,-62870,-13316276,-28428446,-10660304,-2665076,-1683542,-1063028,-669746,-375824,
-93956,1960,490,4336,1084,1318,11302,269368,67342,38788,7636,9340,6754,2896,724,4396,
3580,3424,856,214,1906,1078,6172,2644,4480,1120,280,70,3040,760,190,2050,
1132,12910,8170,11626,267910,256882,96694,71338,47482,13990,107530,35374,20806,29284,5854,3514,
1624,406,2068,1678,1852,20536,5134,3796,8872,2218,3742,34126,20104,5026,2248,562,
574,8224,2056,514,556,
374,1268,602,590,2228,782,2390,54014,139280,34820,5534,26882,8198,5522,3650,
1664,416,104,26,4442,2030,4784,1196,6116,4280,1070,3542,5336,1334,1610,968,242,
2498,1340,19808,4952,1238,17564,9140,2078,56012,16664,4166,3254,2420,818,4658,24344,
6086,4334,
26608,6652,1612,6166,6250,7006,2992,748,1480,370,1120,280,70,658,1282,
9922,14914,17428,25960,6490,41872,10468,3856,964,1252,1264,316,424,106,1822,1048,
262,712,178,1012,3604,7222,3916,14296,3574,2830,1426,1714,1876,2524,838,874,
2470,3982,1858,36382,14008,3502,1678,994,1468,640,160,40,10,1090,4306,3334,1576,
394,2458,22234,47020,17938,11002,16888,4222,1948,730,6196,16402,10138,41644,35842,250222,
94198,41062,21316,7150,3046,1486,922,18544,4636,1234,1606,
416,104,26,17372,2678,1370,2810,2570,2360,590,806,668,734,2480,620,482,2144,
536,134,428,446,1514,1766,1028,1994,2036,18680,4670,3296,824,206,698,
1346,10244,4910,3188,1724,2900,1730,5132,1328,332,58682,25808,6452,27362,24824,6206,
3944,986,2084,10568,2642,19820,4082,8138,5492,2210,3602,17858,
8134,5686,4114,1798,18586,7336,1834,1054,2338,2314,1234,988,4366,20044,24832,6208,
1552,388,28792,7198,6226,2392,598,1252,7732,1816,454,1708,1396,628,484,
898,2926,19882,7822,68158,59248,14812,9628,13114,5284,1384,346,496,124,1792,448,
112,28,9088,2272,568,142,33166,173548,49726,43696,10924,3988,1114,784,196,
1388,2330,1298,854,2216,554,8612,1982,1892,722,638,137648,34412,16262,81278,26876,
25388,14930,5966,4274,1970,1106,782,1358,1682,998,5696,1424,356,434,530,566,
2222,2168,542,2294,3680,920,230,9098,985472,246368,61592,15398,22472,5618,2474,3590,
12458,12860,6020,1496,374,2060,
394,2020,3526,1690,1870,2122,51484,88054,33388,6628,2200,550,574,9202,9358,38572,
7600,1900,724,1210,1600,400,100,2932,1744,436,1042,2626,7744,1936,484,2878,
2554,2356,1582,35566,24874,41326,25396,8062,5596,4138,2470,1294,7486,4012,1120,280,
70,
3542,2492,836,3704,926,716,746,7136,1784,446,536,134,3074,5894,2096,
524,908,3056,764,512,128,32,8,2,
1066,946,724,748,9442,3910,5602,2470,3838,3082,1504,376,94,976,244,1390,
1648,412,2092,4324,1180,3550,2920,730,2962,1480,370,508,
392,98,6428,7076,2774,2486,2324,806,2228,788,518,2876,2972,3398,2498,2396,
5738,2522,1316,1904,476,8372,1940,734,2378,1262,11288,2822,5564,4106,1910,2000,
500,464,116,992,248,62,4658,1958,3206,8534,5726,6590,32672,8168,2042,1136,
284,3188,968,242,716,4766,5780,1454,9524,2156,1532,2174,2372,3134,23810,13736,
3434,1658,
1972,3844,2008,502,790,1024,256,64,16,4,928,232,58,1810,3628,
1240,310,736,184,46,388,1036,87832,21958,16282,7396,2626,2404,6994,9964,2050,
2080,520,130,1000,250,934,1738,5212,1348,1306,2518,4762,6220,2656,664,166,
1414,22930,16480,4120,1030,12016,3004,
944,236,416,104,26,1154,11144,2786,12116,32426,51542,19700,6470,2798,2528,632,
158,1934,12176,3044,3050,21212,5822,2288,572,920,230,458,1262,1880,470,548,
3176,794,1376,344,86,404,7154,7802,5318,2366,1316,10658,25136,6284,1550,3374,
2450,8234,11150,8930,25238,9836,2216,554,3860,1784,446,776,194,3266,380,704,
176,44,6830,6146,8846,8090,5480,1370,1700,2234,2186,59618,301292,56864,14216,3554,
17846,7064,1766,1034,
382,3508,1030,1510,1780,706,850,1708,2518,4948,1300,616,154,430,3328,832,
208,52,42694,24946,27646,38014,51136,12784,3196,8086,11014,7126,18070,216862,416608,104152,
26038,44800,11200,2800,700,83428,65716,12694,15388,8260,1732,5290,2356,814,24934,14956,
3028,940,3490,1570,1192,298,484,1222,1618,2032,508,3346,14578,47464,11866,4822,
4144,1036,
554,980,2984,746,1904,476,42242,16214,81266,30848,7712,1928,482,1466,4400,1100,
5234,2336,584,146,428,8366,4868,1286,2858,1688,422,1970,1112,278,5450,2186,
1268,2804,3290,3734,130298,64016,16004,3374,4118,12740,2762,1430,21410,8402,3524,1034,
944,236,3182,6368,1592,398,1304,326,2048,512,128,32,8,2,374,3506,
782,6584,1646,4910,5090,2282,2390,17036,8960,2240,560,140,1832,458,
382,1516,658,6178,6988,1684,1408,352,88,22,4072,1018,1504,376,94,964,
2182,1192,298,1102,802,2452,1624,406,526,4774,2164,1522,4096,1024,256,64,
16,4,2656,664,166,436,1696,424,106,994,2614,1354,1264,316,2506,2344,
586,1126,796,766,1678,
524,4952,1238,1004,6818,4772,2084,4340,2390,1328,332,3488,872,218,1964,932,
1274,2516,21074,9968,2492,842,219044,47282,48242,24764,5018,6014,2630,2468,1598,974,
740,3440,860,536,134,1436,644,1118,794,2450,1958,5852,1472,368,92,392,
98,992,248,62,398};

unsigned char cflag[1679+1676+1871+1869+1880+1]={
0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,
3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2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,1,1,
1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,1,
1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,4,
4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,8,8,8,8,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
255};

int cval[167]={1001,1003,1007,1009,1013,1015,1019,1021,1025,1027,1031,1033,
	      1037,1039,1043,1045,1049,1051,1055,1057,1061,1063,1067,1069,
	      1073,1075,1079,1081,1085,1087,1091,1093,1097,1099,1103,1105,
	      1109,1111,1115,1117,1121,1123,1127,1129,1133,1135,1139,1141,
	      1145,1147,1151,1153,1157,1159,1163,1165,1169,1171,1175,1177,
	      1181,1183,1187,1189,1193,1195,1199,1201,1205,1207,1211,1213,
	      1217,1219,1223,1225,1229,1231,1235,1237,1241,1243,1247,1249,
	      1253,1255,1259,1261,1265,1267,1271,1273,1277,1279,1283,1285,
	      1289,1291,1295,1297,1301,1303,1307,1309,1313,1315,1319,1321,
	      1325,1327,1331,1333,1337,1339,1343,1345,1349,1351,1355,1357,
	      1361,1363,1367,1369,1373,1375,1379,1381,1385,1387,1391,1393,
	      1397,1399,1403,1405,1409,1411,1415,1417,1421,1423,1427,1429,
	      1433,1435,1439,1441,1445,1447,1451,1453,1457,1459,1463,1465,
	      1469,1471,1475,1477,1481,1483,1487,1489,1493,1495,1499};

unsigned int size[167]={
21,33,69,40,60,76,32,47,25,50,61,83,29,24,28,84,12,47,28,36,17,49,65,52,31,
48,111,52,64,71,62,77,69,26,
51,84,19,14,26,53,33,95,43,96,42,65,17,50,55,41,57,88,47,30,105,35,53,42,26,
76,76,24,29,55,41,47,61,
121,49,81,15,27,26,65,58,58,24,94,74,25,108,13,60,40,43,27,57,123,81,87,48,
44,46,63,50,26,20,57,81,80,
47,32,116,67,17,18,117,70,42,69,23,94,44,36,51,61,90,55,60,109,34,53,56,23,
26,27,46,46,46,49,53,57,47,88,
55,62,48,29,51,127,37,96,68,36,15,42,43,79,64,47,24,85,50,91,60,62,54,49,24,
28,66,54,84,66,78,53,53};

unsigned int conv[27*2]={5,3,6,4,8,5,9,6,11,7,16,10,19,12,24,15,27,17,38,24,
  46,29,57,36,65,41,76,48,84,53,130,82,149,94,168,106,233,147,252,159,317,200,
  336,212,401,253,420,265,485,306,504,318,569,359};

int hflag=0;	 // selects which c value to histogram k values
int hflag1=0;	 // selects which c value to histogram j values
unsigned int indmin=1;	 // selects (l,m) value
unsigned int indmax=1;	 // Note: Could include different (l,m) values.
unsigned int bypass=0;	 // normally set to 0
unsigned int wflag=1;	 // normally set to 0
unsigned int infin=0;	 // normally set to 0
int k,max,temp,order,s[500],t,u,savek,oldk,c,olds,cmax,cmin,delta,locmin,locmax;
unsigned int g,h,i,m,iters,j,count,first,odds,evens,flag,lodds,levens,jump,jcnt;
unsigned int flag0,offset,index,sumtu,total,stu[1000*2],county,countn,countx;
unsigned int histo[100],mincnt,hismin[10],savjmp,second,histoj[100],histom[10];
int lastodd,glomax,usave,tmps,cyccnt,mcount,hcount,icount,lcount,oddsum,oldt,oldu;
unsigned int jumps[500],mflag,attcnt,savind,newhis[100],oldhis[100],histon[20];
unsigned int histoh[200],histoi[100],histox[100],badcnt,badcntu,primary,jmpcnt;
int glomin,a,badcomp,savet,lastt,evensum,jsum,hsum,compcnt,sum;
unsigned int firstt,savjump,savcnt,twojmp,lasthop,jmphop,tmpcnt,offset1,histoy[100];
unsigned int twojmp0,twojmp1,twojmp2,twojmp3,glojmp,glohop,tmpjump,jmpsum,tempi;
unsigned int histoz[100],histow[200],histov[100],histos[200],offset2,badtucnt;
unsigned int concov[27*3],concove[27*3],histot[30],histou[30],offset4,equcnt;
unsigned int histoa[30],histob[30],offset5,patcnt,cyccntu,cyccntb,histor[100];
unsigned int histod[400],offset6;
double lambda,d,dmin,dmax,del,maxdel,mindel,sumrec,tempf,chain,rat,oldchn;
double ratdel,tempg,cap,cam,bp,bm,savchain,maxcmp,mean,std,var;
FILE *Outfp;
Outfp = fopen("out0ch.dat","w");
for (i=0; i<100; i++) {
   histo[i]=0;
   histoj[i]=0;
   newhis[i]=0;
   oldhis[i]=0;
   histoi[i]=0;
   histox[i]=0;
   histoy[i]=0;
   histoz[i]=0;
   histov[i]=0;
   histor[i]=0;
   }
for (i=0; i<200; i++) {
   histoh[i]=0;
   histow[i]=0;
   histos[i]=0;
   }
for (i=0; i<10; i++) {
   hismin[i]=0;
   histom[i]=0;
   }
for (i=0; i<20; i++)
   histon[i]=0;
for (i=0; i<30; i++) {
   histot[i]=0;
   histou[i]=0;
   histoa[i]=0;
   histob[i]=0;
   }
for (i=0; i<27*3; i++) {
   concov[i]=0;
   concove[i]=0;
   }
for (i=0; i<400; i++)
   histod[i]=0;
badcnt=0;
badcntu=0;
badtucnt=0;
badcomp=0;
compcnt=0;
cyccntu=0;
cyccntb=0;
equcnt=0;
maxcmp=0.0;
primary=0;
rat=log(3.0)/log(2.0);
ratdel=rat/(rat-1.0);
offset=20;
offset1=60;
offset2=80;
offset4=15;
offset5=20;
offset6=100;
index=0;
maxdel=-1000000.0;
mindel=1000000.0;
county=0;
countn=0;
countx=0;
cyccnt=0;
mcount=0;
glojmp=0;
glohop=0;
jmphop=0;
twojmp=0;
twojmp0=0;
twojmp1=0;
twojmp2=0;
twojmp3=0;
for (h=0; h<167; h++) {
   c=cval[h];
   iters=size[h];
   printf("c=%d \n",c);
   for (i=0; i<iters; i++)
      s[i]=sin[i+index];
//
// compute order (of loop)
//
   sumtu=0;
   total=0;
   olds=0;
   glomax=0;
   glomin=1000000000;
   a=0;
   mflag=0;
   attcnt=0;
   patcnt=0;
   savind=0;
   sumrec=0.0;
   oddsum=0;
   jmpsum=0;
   oldt=0;
   lastt=0;
   firstt=1;
   oldchn=1000000000.0;
   oldu=0;
   evensum=0;
   jsum=0;
   hcount=0;
   for (i=0; i<iters; i++) {
      k=s[i];
      savek=k;
      max=k;
      if (max<0)
	 max=-max;
      levens=0;
      while (k==(k/2)*2) {
	 k=k/2;
	 levens=levens+1;
	 }
      lodds=1;
      for (j=1; j<100000; j++) {
	 k=3*k+c;
	 if ((k&7)==0) {
	    oldk=savek;
	    savek=k;
	    }
	 temp=k;
	 if (temp<0)
	    temp=-temp;
	 if (temp>max)
	    max=temp;
	 while (k==(k/2)*2) {
	    if (k==s[i]) {
	       levens=levens-1;
	       goto bskip;
	       }
	    k=k/2;
	    levens=levens+1;
	    }
	 levens=levens-1;
	 lodds=lodds+1;
	 }
      printf("error: i=%d, s[i]=%d \n",i,s[i]);
      goto zskip;
bskip:
      order=3;
      while (order<max)
	 order=order*2;
      while ((oldk&1)==0)
	 oldk=oldk/2;
      u=oldk;
//
// find odd natural number divisible by 3
//
      k=s[i];
      max=k;
      if (max<0)
	 max=-max;
      while (k!=(k/3)*3) {
	 if (k==(k/2)*2) {
	    if ((k-c)==((k-c)/3)*3) {
	       k=(k-c)/3;
	       temp=k;
	       if (temp<0)
		  temp=-temp;
	       if (temp>max)
		  max=temp;
	       }
	    else {
	       k=k*2;
	       temp=k;
	       if (temp<0)
		  temp=-temp;
	       if (temp>max)
		  max=temp;
	       }
	    }
	 else {
	    k=k*2;
	    temp=k;
	    if (temp<0)
	       temp=-temp;
	    if (temp>max)
	       max=temp;
	    }
	 }
//
// include even natural numbers to the left of the odd natural number divisible
// by 3
//
      t=k;
      jump=1;
      flag0=3;
      if ((3*t+c)==s[i]) {
	 jump=0;
	 flag0=0;
	 }
      temp=t-u;
      m=0;
      jcnt=0;
      while ((temp&1)==0) {
	 m=m+1;
	 temp=temp/2;
	 }
      while (order<max)
	 order=order*2;
      temp=k;
      if (temp<0)
	 temp=-temp;
      while (temp<(order/2)) {
	 temp=temp*2;
	 k=k*2;
	 }
//
// compute sequence
//
      hsum=0;
      count=1;
      first=1;
      while (k==(k/2)*2) {
	 k=k/2;
	 count=count+1;
	 }
      evens=count-1;
      odds=1;
      for (j=1; j<10000; j++) {
	 k=3*k+c;
	 count=count+1;
	 if (first==0) {
	    if (((k&3)==0)&&((k&7)!=0))
	       hsum=hsum+1;
	    }
	 flag=0;
	 while (k==(k/2)*2) {
	    if (k==s[i]) {
	       if (first==1)
		  first=0;
	       else
		  goto askip;
	       }
	    k=k/2;
	    count=count+1;
	    flag=flag+1;
	    }
	 if (first==1) {
	    evens=evens+(flag-1);
	    odds=odds+1;
	    if (flag==2) {
	       jcnt=jcnt+1;
	       if ((3*k+c)==s[i])
		  flag0=1;
	       }
	    }
	 }
      printf("error \n");
      goto zskip;
askip:
      if ((jcnt==1)&&(flag0==1))
	 jump=1;
      if ((jcnt>1)&&(flag0==1))
	 jump=2;
      if ((jcnt>0)&&(flag0==0))
	 jump=3;
      if (flag0==3)
	 jump=3;
      jumps[i]=jump;
      attcnt=attcnt+1;
//
// check order of jump types for primary, secondary, tertiary, etc.
//
      if ((4*s[i])!=olds) {
	 tmpjump=jump;
	 if (jump==3) {
	    printf("error: primary jumped-over attachment point \n");
	    goto zskip;
	    }
	 }
      else {
	 if (tmpjump==0) {
	    if (jump!=3) {
	       printf("error: incorrect order \n");
	       fprintf(Outfp,"error: incorrect order \n");
	       goto zskip;
	       }
	    }
	 if (tmpjump==3) {
	    if ((jump!=1)&&(jump!=2)) {
	       printf("error: incorrect order \n");
	       fprintf(Outfp,"error: incorrect order \n");
	       goto zskip;
	       }
	    }
	 if ((tmpjump==1)||(tmpjump==2)) {
	    if (jump!=0) {
	       printf("error: incorrect order \n");
	       fprintf(Outfp,"error: incorrect order \n");
	       goto zskip;
	       }
	    }
	 tmpjump=jump;
	 }
//
// check hops in multiple-jumps
//
      jmpcnt=0;
      if (jump==2) {
	 first=0;
	 second=0;
	 flag0=0;
	 k=t;
	 if (((3*k+c)&3)==0) {	      // check for hop
	    first=1;		      // hop count
	    lasthop=1;		      // set last hop flag
	    }
	 else {
	    second=1;		      // jump count
	    flag0=1;		      // set first jump flag
	    lasthop=0;
	    }
	 while ((3*k+c)!=s[i]) {
	    k=k+c;
	    tmpcnt=0;
	    while ((k&1)==0) {
	       k=k/2;
	       tmpcnt=tmpcnt+1;
	       }
	    for (j=0; j<tmpcnt; j++)
	       k=k*3;
	    k=(k-c)/2;
	    if ((((3*k+c)&3)==0)&&((3*k+c)!=s[i])) {  // check for hop
	       first=first+1;	      // increment hop count
	       lasthop=1;	      // set last hop flag
	       }
	    if ((((3*k+c)&3)!=0)&&((3*k+c)!=s[i])) {  // check for jump
	       second=second+1;       // increment jump count
	       lasthop=0;
	       }
	    jmpcnt=jmpcnt+1;
	    }
	 if ((flag0==0)&&(second>0)&&(lasthop==1)) {  // first and last are hops
	    if (wflag==5) {
	       printf("warning: non-adjacent hops, c=%d, s=%d \n",c,s[i]);
	       fprintf(Outfp,"warning: non-adjacent hops, c=%d, s=%d \n",c,s[i]);
	       }
	    jmphop=jmphop+1;
	    }
	 if ((flag0==1)&&(first>0)&&(lasthop==0)) {  // first and last are jumps
	    if (wflag==5) {
	       printf("warning: non-adjacent jumps, c=%d, s=%d \n",c,s[i]);
	       fprintf(Outfp,"warning: non-adjacent jumps, c=%d, s=%d \n",c,s[i]);
	       }
	    jmphop=jmphop+1;
	    }
	 glohop=glohop+first;	     // total number of hops
	 glojmp=glojmp+second;	     // total number of jumps
	 if (jmpcnt==2) {
	    twojmp=twojmp+1;	     // total number of two-"jumps"
	    if (first==2)
	       twojmp0=twojmp0+1;
	    if ((first==1)&&(second==1)) {
	       if (lasthop==1)
		  twojmp1=twojmp1+1;
	       else
		  twojmp2=twojmp2+1;
	       }
	    if (second==2)
	       twojmp3=twojmp3+1;
	    }
	 mcount=mcount+1;
	 }
//
// check chain (t values)
//
      if ((4*s[i])!=olds) {
	 temp=t+c;
	 if (temp<0)
	    temp=-temp;
	 chain=(double)temp;
	 temp=s[i];
	 if (temp<0)
	    temp=-temp;
	 while ((temp&1)==0)	 // next u value
	    temp=temp/2;
	 chain=rat*log(chain);
	 chain=exp(chain);
	 if (jump==1)
	    chain=chain*2.0;
	 if (jump==2)
	    chain=chain*(double)(1<<jmpcnt);
	 if (chain<(double)temp) {
	    if (wflag!=2) {
	       printf("error:  bad t-u chain, c=%d, t=%d, u=%d, jump=%d, count=%d \n",c,t,temp,jump,jmpcnt);
	       fprintf(Outfp,"error:  bad t-u chain, c=%d, t=%d, u=%d, jump=%d, count=%d \n",c,t,temp,jump,jmpcnt);
	       }
	    badtucnt=badtucnt+1;
	    }
	 if (chain<(double)oldt) {
	    if (wflag!=2) {
	       printf("error: bad chain, c=%d \n",c);
	       printf("chain=%e, oldt=%d, t=%d, jump=%d, count=%d, s=%d \n",chain,oldt,t,jump,jmpcnt,s[i]);
	       fprintf(Outfp,"error: bad chain, c=%d \n",c);
	       fprintf(Outfp,"chain=%e, oldt=%d, t=%d, jump=%d, count=%d, s=%d \n",chain,oldt,t,jump,jmpcnt,s[i]);
	       }
	    badcnt=badcnt+1;
	    }
	 oldt=t;
	 if (oldt<0)
	    oldt=-oldt;
	 if (firstt==1) {
	    savchain=chain;
	    savet=t;
	    savjump=jump;
	    savcnt=jmpcnt;
	    firstt=0;
	    }
	 }
//
// check for powers of 2
//
      if (((4*s[i])!=olds)&&(jump==2)&&(jmpcnt==2)) {
	 temp=t;
	 temp=temp+c;
	 if (temp<0)
	    temp=-temp;
	 while ((temp&1)==0)
	    temp=temp/2;
	 if ((wflag==3)&&(temp==1)) {
	    printf("power of two:  c=%d, u=%d, t=%d, s=%d \n",c,u,t,s[i]);
	    fprintf(Outfp,"power of two:  c=%d, u=%d, t=%d, s=%d \n",c,u,t,s[i]);
	    }
	 if (chain<(double)lastt) {
	    printf("error: bad chain, chain=%e, lastt=%d \n",chain,lastt);
	    fprintf(Outfp,"error: bad chain, chain=%e, lastt=%d \n",chain,lastt);
	    goto zskip;
	    }
	 }
      lastt=t;
      if (lastt<0)
	 lastt=-lastt;
//
// count hops up until attachment point
//
      if ((4*s[i])!=olds) {
	 icount=0;
	 k=u;
	 k=3*k+c;
	 while (k!=(4*s[i])) {
	    if ((k&3)==0) {
	       icount=icount+1;
	       k=k/4;
	       }
	    else
	       k=k/2;
	    k=3*k+c;
	    }
//
	 lcount=1;
	 k=s[i];
	 while ((k&1)==0) {
	    lcount=lcount+1;
	    k=k/2;
	    }
	 delta=odds+icount-lcount;
	 if (jump==1) {
	    delta=delta-1;
	    jmpsum=jmpsum+1;
	    }
	 if (jump==2) {
	    delta=delta-jmpcnt;
	    jmpsum=jmpsum+jmpcnt;
	    }
	 if ((delta<-10)&&(wflag==0)) {
	    printf("warning: delta less than -10 \n");
	    printf("lcount=%d, icount=%d, delta=%d \n",lcount,icount,odds+icount-lcount);
	    fprintf(Outfp,"warning: delta less than -2 \n");
	    fprintf(Outfp,"lcount=%d, icount=%d, delta=%d \n",lcount,icount,odds+icount-lcount);
	    }
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histoi[delta]=histoi[delta]+1;
//
	 delta=(int)m-lcount+icount;
	 if (jump==1)
	    delta=delta-1;
	 if (jump==2)
	    delta=delta-jmpcnt;
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histox[delta]=histox[delta]+1;
//
	 if (((c==hflag1)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag1==0)) {
	    delta=(int)m-lcount;
	    delta=delta+offset;
	    if (delta<0) {
	       printf("error: offset not big enough \n");
	       goto zskip;
	       }
	    if (delta>99) {
	       printf("error: histogram array not big enough \n");
	       goto zskip;
	       }
	    histoy[delta]=histoy[delta]+1;
	    }
//
	 delta=icount;
	 if (jump==1)
	    delta=delta-1;
	 if (jump==2)
	    delta=delta-jmpcnt;
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histoz[delta]=histoz[delta]+1;
//
	 delta=odds-lcount;
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histor[delta]=histor[delta]+1;
	 }
//
      k=(int)odds-(int)m;
      if (wflag==0) {
	 printf("c=%d, s=%d, o=%d, t=%d, u=%d, e=%d, o=%d, e=%d, o=%d, jump=%d, j=%d, d=%d \n",c,s[i],order,t,u,evens,odds,levens,lodds,jump,m,k);
	 fprintf(Outfp,"c=%d, s=%d, o=%d, t=%d, u=%d, e=%d, o=%d, e=%d, o=%d, jump=%d, j=%d, d=%d \n",c,s[i],order,t,u,evens,odds,levens,lodds,jump,m,k);
	 if (evens<odds) {
	    printf("warning: even count less than odd count \n");
	    fprintf(Outfp,"warning: even count less than odd count \n");
	    }
	 }
//
// continued-fraction convergents
//
      for (tempi=0; tempi<27; tempi++) {
	 if ((conv[2*tempi]==(levens+lodds))&&(conv[2*tempi+1]==lodds)) {
	    if ((concov[3*tempi]==0)||(concov[3*tempi]==(unsigned int)c))
	       concov[3*tempi]=c;
	    else {
	       if ((concov[3*tempi+1]==0)||(concov[3*tempi+1]==(unsigned int)c))
		  concov[3*tempi+1]=c;
	       else
		  concov[3*tempi+2]=c;
	       }
	    if ((4*s[i])!=olds) {
	       delta=(int)m-lcount;
	       delta=delta+offset4;
	       if (delta<0) {
		  printf("array not big enough \n");
		  goto zskip;
		  }
	       if (delta>29) {
		  printf("array not big enough \n");
		  goto zskip;
		  }
	       histot[delta]=histot[delta]+1;
	       }
	    }
	 if (conv[2*tempi+1]>lodds)
	    break;
	 }
//
      for (tempi=0; tempi<27; tempi++) {
	 if ((conv[2*tempi+1]==levens)&&(conv[2*tempi+1]==lodds)) {
	    if ((concove[3*tempi]==0)||(concove[3*tempi]==(unsigned int)c))
	       concove[3*tempi]=c;
	    else {
	       if ((concove[3*tempi+1]==0)||(concove[3*tempi+1]==(unsigned int)c))
		  concove[3*tempi+1]=c;
	       else
		  concove[3*tempi+2]=c;
	       }
	    if ((4*s[i])!=olds) {
	       delta=(int)m-lcount;
	       delta=delta+offset4;
	       if (delta<0) {
		  printf("array not big enough, delta=%d \n",delta);
		  goto zskip;
		  }
	       if (delta>29) {
		  printf("array not big enough, delta=%d \n",delta);
		  goto zskip;
		  }
	       histoa[delta]=histoa[delta]+1;
	       }
	    }
	 if (conv[2*tempi+1]>lodds)
	    break;
	 }
//
// total odds and evens
//
      if ((4*s[i])!=olds) {
	 oddsum=oddsum+odds;
	 evensum=evensum+lcount;
	 jsum=jsum+m;
	 hcount=hcount+icount;
	 patcnt=patcnt+1;
	 }
//
// compute sum of reciprocals
//
      if ((4*s[i])!=olds) {
	 temp=t;
	 if (temp<0)
	    temp=-temp;
	 sumrec=sumrec+(1.0/(double)temp);
	 temp=u;
	 if (temp<0)
	    temp=-temp;
	 sumrec=sumrec+(1.0/(double)temp);
	 primary=primary+1;
	 }
//
// check chain (u values)
//
      if ((4*s[i])!=olds) {
	 temp=u;
	 if (temp<0)
	    temp=-temp;
	 if (oldchn<(double)temp) {
	    if (wflag!=2) {
	       printf("error: bad chain, c=%d \n",c);
	       printf("chain=%e, u=%d, old u=%d, s=%d \n",oldchn,u,oldu,s[i]);
	       fprintf(Outfp,"error: bad chain, c=%d \n",c);
	       fprintf(Outfp,"chain=%e, u=%d, old u=%d, s=%d \n",oldchn,u,oldu,s[i]);
	       }
	    badcntu=badcntu+1;
	    }
	 temp=u+c;
	 if (temp<0)
	    temp=-temp;
	 oldchn=(double)temp;
	 oldchn=rat*log(oldchn);
	 oldchn=exp(oldchn);
	 oldu=u;
	 }
//
// check j values for no-jumps
//
      if (jump==0) {
	 if ((m>10)&&(wflag==0)) {
	    printf("warning: no-jump with j>10 \n");
	    fprintf(Outfp,"warning: no-jump with j>10 \n");
	    }
	 if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
	    if ((4*s[i])!=olds) {
	       if (m>19) {
		  printf("histogram array not big enough \n");
		  goto zskip;
		  }
	       histon[m]=histon[m]+1;
	       }
	    }
	 }
//
// check j values for multiple-jumps
//
      if (jump==2) {
	 if ((m>3)&&(wflag==0)) {
	    printf("warning: multiple-jump with j>3 \n");
	    fprintf(Outfp,"warning: multiple-jump with j>3 \n");
	    }
	 if ((4*s[i])!=olds) {
	    if (m>9) {
	       printf("histogram array not big enough \n");
	       goto zskip;
	       }
	    histom[m]=histom[m]+1;
	    }
	 }
//
// histogram k values
//
      if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
	 if ((jump==1)&&((4*s[i])!=olds)) {
	    delta=k+offset;
	    if (delta<0) {
	       printf("error: offset not big enough \n");
	       goto zskip;
	       }
	    if (delta>99) {
	       printf("error: histogram array not big enough \n");
	       goto zskip;
	       }
	    histoj[delta]=histoj[delta]+1;
	    }
	 }
//
// histogram evens minus odds
//
      if (jump==1) {
	 delta=(int)evens-(int)odds;
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histo[delta]=histo[delta]+1;
	 }
//
// find minimum t or u
//
      if ((4*s[i])!=olds) {
	 temp=t;
	 if (temp<0)
	    temp=-temp;
	 if (temp<glomin)
	    glomin=temp;
	 temp=u;
	 if (temp<0)
	    temp=-temp;
	 if (temp<glomin)
	    glomin=temp;
	 a=a+1;
	 }
//
// find local maximum and minimum
//
      k=u;
      locmin=k;
      if (locmin<0)
	 locmin=-locmin;
      locmax=locmin;
      lastodd=locmax;
      k=3*k+c;
      while ((k&7)!=0) {
	 while ((k&1)==0) {
	    k=k/2;
	    }
	 delta=k;
	 if (delta<0)
	    delta=-delta;
	 if (delta<locmin)
	    locmin=delta;
	 if (delta>locmax)
	    locmax=delta;
	 lastodd=delta;
	 k=3*k+c;
	 }
      if ((4*s[i])!=olds) {	   // check if primary
	 if ((lastodd!=locmax)&&(jump==2)) {
	    printf("error: no-jump with local maximum at attachment point \n");
	    printf("locmin=%d, locmax=%d, lastodd=%d \n",locmin,locmax,lastodd);
	    fprintf(Outfp,"error: no-jump with local maximum at attachment point \n");
	    goto zskip;
	    }
	 if (lastodd!=locmax) {
	    if (jump==0)
	       county=county+1;
	    if (jump==1) {
	       countn=countn+1;
	       if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
		  delta=(int)odds-(int)m;
		  delta=delta+offset;
		  if (delta<0) {
		     printf("array not big enough \n");
		     goto zskip;
		     }
		  if (delta>99) {
		     printf("array not big enough \n");
		     goto zskip;
		     }
		  newhis[delta]=newhis[delta]+1;
		  }
	       }
	    if (jump==3)
	       countx=countx+1;
	    }
	 }
      if ((4*s[i])!=olds) {
	 if (locmax>glomax) {
	    glomax=locmax;
	    usave=u;
	    savjmp=jump;
	    }
	 }
//
// check local minimum
//
      if ((jump==1)&&((4*s[i])!=olds)) {
	 mincnt=0;
	 k=u;
	 delta=k;
	 if (delta<0)
	    delta=-delta;
	 if (delta==locmin) {
	    hismin[0]=hismin[0]+1;
	    goto yskip;
	    }
	 while (delta!=locmin) {
	    k=3*k+c;
	    if ((k&3)!=0) {
	       hismin[9]=hismin[9]+1;
	       if (bypass==0)
		  goto pskip;
	       else
		  goto yskip;
	       }
	    k=k/4;
	    delta=k;
	    if (delta<0)
	       delta=-delta;
	    mincnt=mincnt+1;
	    }
	 if (mincnt>8) {
	    printf("error: array not big enough \n");
	    goto zskip;
	    }
	 hismin[mincnt]=hismin[mincnt]+1;
pskip:	 if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
	    delta=(int)odds-(int)m;
	    delta=delta+offset;
	    if (delta<0) {
	       printf("array not big enough \n");
	       goto zskip;
	       }
	    if (delta>99) {
	       printf("array not big enough \n");
	       goto zskip;
	       }
	    oldhis[delta]=oldhis[delta]+1;
	    }
	 }
//
// check multiple-jumps
//
yskip:
      if ((jump==2)&&((4*s[i])!=olds)) {
	 k=u;
	 k=3*k+c;
	 while ((k&7)!=0) {
	    if ((k&3)==0) {
	       printf("error: not one jump from u \n");
	       fprintf(Outfp,"error: not one jump from u \n");
	       goto zskip;
	       }
	    k=k/2;
	    k=3*k+c;
	    }
	 }
//
// check if primary multiple-jumps are preceded by no-jumps
// Note:  Only last primary multiple-jump checked.
//
      if ((jump==2)&&((4*s[i])!=olds)) {
	 k=u*2;
	 if ((((k-c)/3)*3)!=(k-c))
	    k=k*2;
	 tmps=k;
	 mflag=1;
	 }
//
// compute domain
//
      if ((4*s[i])!=olds) {
	 k=t;
	 if (k<0)
	    k=-k;
	 sumtu=sumtu+k;
	 stu[2*total]=k;
	 k=u;
	 if (k<0)
	    k=-k;
	 sumtu=sumtu+k;
	 stu[2*total+1]=k;
	 total=total+1;
	 if (total>1000) {
	    printf("output array too small \n");
	    goto zskip;
	    }
	 }
//
// check for new cycle
//
      if ((cflag[index+i]!=cflag[index+i+1])||(i==(iters-1))) {
	 lambda=(double)sumtu/(double)(total*2);
	 dmin=1000000.0;
	 dmax=-1000000.0;
	 for (g=0; g<total*2; g++) {
	    d=-log((double)stu[g]/lambda)/lambda;
	    if (d<dmin)
	       dmin=d;
	    if (d>dmax)
	       dmax=d;
	    }
	 del=dmax-dmin;
	 if (del>maxdel) {
	    maxdel=del;
	    cmax=c;
	    }
	 if (del<mindel) {
	    mindel=del;
	    cmin=c;
	    }
	 if (wflag==0) {
	    printf("lambda=%e, min=%e, max=%e, del=%e \n",lambda,dmin,dmax,del);
	    fprintf(Outfp,"lambda=%e, min=%e, max=%e, del=%e \n",lambda,dmin,dmax,del);
	    }
	 sumtu=0;
	 total=0;
	 olds=0;
	 cyccnt=cyccnt+1;
//
	 sumrec=sumrec*(double)c;
	 tempf=(double)(levens+lodds)*log(2)-(double)(lodds)*log(3);
	 if (wflag==1) {
	    printf("c=%d, e=%d, o=%d, sum=%e, tempf=%e, osum=%d, esum=%d, jsum=%d, hsum=%d \n",c,levens,lodds,sumrec,tempf,oddsum,evensum,jsum,hcount);
	    fprintf(Outfp,"c=%d, e=%d, o=%d, sum=%e, tempf=%e, osum=%d, esum=%d, jsum=%d, hsum=%d \n",c,levens,lodds,sumrec,tempf,oddsum,evensum,jsum,hcount);
	    }
	 if (tempf<0.0)
	    tempf=-tempf;
	 if (tempf>(sumrec*3.0)) {
	    printf("error: delta greater than sum of reciprocals \n");
	    fprintf(Outfp,"error: delta greater than sum of reciprocals \n");
	    goto zskip;
	    }
	 sumrec=0.0;
//
	 if (savchain<oldt) {
	    if (wflag!=2) {
	       printf("error: bad chain (wrap-around), c=%d \n",c);
	       printf("chain=%e, oldt=%d, t=%d, jump=%d, count=%d, s=%d \n",savchain,oldt,savet,savjump,savcnt,s[i]);
	       fprintf(Outfp,"error: bad chain (wrap-around), c=%d \n",c);
	       fprintf(Outfp,"chain=%e, oldt=%d, t=%d, jump=%d, count=%d, s=%d \n",savchain,oldt,savet,savjump,savcnt,s[i]);
	       }
	    badcnt=badcnt+1;
	    }
	 oldt=0;
	 lastt=0;
	 firstt=1;
	 oldchn=1000000000.0;
	 oldu=0;
//
	 delta=oddsum-jmpsum+hcount-evensum+offset1;
	 if (delta<0) {
	    printf("error: offset not big enough, delta=%d \n",delta);
	    goto zskip;
	    }
	 if (delta>199) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histoh[delta]=histoh[delta]+1;
	 if (wflag==0) {
	    if ((oddsum+hcount+2)<evensum) {
	       printf("warning: oddsum=%d, hcount=%d, evensum=%d \n",oddsum,hcount,evensum);
	       fprintf(Outfp,"warning: oddsum=%d, hcount=%d, evensum=%d \n",oddsum,hcount,evensum);
	       }
	    }
//
	 delta=hcount-jmpsum+offset1;
	 if (delta<0) {
	    printf("error: offset not big enough, delta=%d \n",delta);
	    goto zskip;
	    }
	 if (delta>199) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histow[delta]=histow[delta]+1;
//
	 delta=jsum-evensum+offset2;
	 if (delta<0) {
	    printf("error: offset not big enough, jsum=%d, delta=%d \n",jsum,delta);
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histov[delta]=histov[delta]+1;
//
	 for (tempi=0; tempi<27; tempi++) {
	    if ((conv[2*tempi]==(levens+lodds))&&(conv[2*tempi+1]==lodds)) {
	       delta=jsum-evensum+offset4;
	       if (delta<0) {
		  printf("array not big enough \n");
		  goto zskip;
		  }
	       if (delta>29) {
		  printf("array not big enough \n");
		  goto zskip;
		  }
	       histou[delta]=histou[delta]+1;
	       cyccntu=cyccntu+1;
	       if ((3.0*log(c))<patcnt) {
		  printf("not enough attachment points, c=%d, count=%d \n",c,patcnt);
		  goto zskip;
		  }
	       }
	    if (conv[2*tempi+1]>lodds)
	       break;
	    }
//
	 for (tempi=0; tempi<27; tempi++) {
	    if ((conv[2*tempi+1]==levens)&&(conv[2*tempi+1]==lodds)) {
	       delta=jsum-evensum+offset5;
	       if (delta<0) {
		  printf("array not big enough, delta b=%d \n",delta);
		  goto zskip;
		  }
	       if (delta>29) {
		  printf("array not big enough, delta b=%d \n",delta);
		  goto zskip;
		  }
	       histob[delta]=histob[delta]+1;
	       cyccntb=cyccntb+1;
	       if ((3.0*log(c))<patcnt) {
		  printf("not enough attachment points, c=%d, count=%d \n",c,patcnt);
		  goto zskip;
		  }
	       }
	    if (conv[2*tempi+1]>lodds)
	       break;
	    }
//
	 delta=oddsum-evensum+offset1;
	 if (delta<0) {
	    printf("error: offset not big enough, jsum=%d, delta=%d \n",jsum,delta);
	    goto zskip;
	    }
	 if (delta>199) {
	    printf("error: histogram array not big enough \n");
	    goto zskip;
	    }
	 histos[delta]=histos[delta]+1;
//
// check limit
//
	 if (oddsum>jsum) {
	    tempi=oddsum-jsum;
	    tempf=1.0;
	    for (j=0; j<tempi; j++)
	       tempf=tempf*2.0;
	    tempf=(rat-1.0)*log(tempf);
	    tempf=exp(tempf);
	    tempg=1.0;
	    for (j=0; j<(unsigned int)evensum; j++)
	       tempg=tempg*2.0;
	    tempf=tempf/tempg;
	    if (tempf>1.0) {
	       printf("warning: tempf=%e, tempg=%e, oddsum=%d, jsum=%d, evensum=%d \n",tempf,tempg,oddsum,jsum,evensum);
	       compcnt=compcnt+1;
	       if (tempf>maxcmp)
		  maxcmp=tempf;
	       }
	    }
//
	 if (hsum!=hcount) {
	    printf("mis-matched sums \n");
	    goto zskip;
	    }
	 oddsum=0;
	 evensum=0;
	 jsum=0;
	 jmpsum=0;
	 hcount=0;
//
//  check primary multiple jumps
//
	 if (mflag!=0) {
	    for (j=0; j<attcnt; j++) {
	       if (s[j+savind]==tmps) {
		  if ((jumps[j+savind]!=0)&&(jumps[j+savind]!=3)) {
		     printf("error: one-jump not found \n");
		     goto zskip;
		     }
		  goto vskip;
		  }
	       }
	    printf("error: no match \n");
	    goto zskip;
	    }
//
//  check number of attachment points
//
vskip:	 if ((3.0*log(c))<patcnt) {
	    if (wflag==0) {
	       printf("not enough attachment points, c=%d, count=%d \n",c,patcnt);
	       fprintf(Outfp,"not enough attachment points, c=%d, count=%d \n",c,patcnt);
	       }
	    if (levens==lodds)
	       equcnt=equcnt+1;
	    }
	 delta=(int)(3.0*log(c))-patcnt+offset6;
	 if (delta<0) {
	    printf("array not big enough (histod): delta=%d \n",delta);
	    goto zskip;
	    }
	 if (delta>399) {
	    printf("array not big enough (histod): delta=%d \n",delta);
	    goto zskip;
	    }
	 histod[delta]=histod[delta]+1;
//
	 attcnt=0;
	 patcnt=0;
	 mflag=0;
	 savind=i+1;
//
// compute inequality
//
	 if (infin==0) {
	    bp=1.0+(double)c/(double)glomin;
	    bm=1.0-(double)c/(double)glomin;
	    if (bm<0.0)
	       bm=-bm;
	    }
	 else {
	    bp=1.0;
	    bm=1.0;
	    }
	 tempf=exp((double)a*log(rat))-1.0;
	 tempg=(double)a/tempf;
	 tempg=ratdel-tempg;
	 cap=exp(tempg*log(bp));
	 cam=exp(tempg*log(bm));
	 cap=3.0*(double)c*(double)a*cap;
	 cam=3.0*(double)c*(double)a*cam;
	 tempg=(rat-1.0)/tempf;
	 tempg=-tempg*(double)lodds;
	 tempg=exp(tempg*log(2.0));
	 cap=cap*tempg;
	 cam=cam*tempg;
	 tempf=(double)(levens+lodds)*log(2)-(double)lodds*log(3);
	 if (tempf<0.0)
	    tempf=-tempf;
	 if ((tempf>cap)||(tempf>cam)) {
	    printf("error: c=%d, e=%d, o=%d, a=%d, cap=%e, cam=%e, tempf=%e \n",c,levens,lodds,a,cap,cam,tempf);
	    fprintf(Outfp,"error: c=%d, e=%d, o=%d, a=%d, cap=%e, cam=%e, tempf=%e \n",c,levens,lodds,a,cap,cam,tempf);
	    badcomp=badcomp+1;
	    }
	 glomin=1000000000;
	 a=0;
//
// check global maximum
//
	 k=usave;
	 locmax=k;
	 if (locmax<0)
	    locmax=-locmax;
	 lastodd=locmax;
	 k=3*k+c;
	 while ((k&7)!=0) {
	    while ((k&1)==0) {
	       k=k/2;
	       }
	    delta=k;
	    if (delta<0)
	       delta=-delta;
	    if (delta>locmax) {
	       locmax=delta;
	       usave=k;
	       }
	    lastodd=delta;
	    k=3*k+c;
	    }
	 if (lastodd!=locmax) {
	    k=usave;
	    k=3*k+c;
	    while ((k&7)!=0) {
	       k=k/2;
	       if ((k&1)==0) {
		  k=k/2;
		  delta=k;
		  if (delta<0)
		     delta=-delta;
		  if (delta==lastodd) {
		     if (savjmp==0)
			goto wskip;
		     else {
			printf("error: not a no-jump attachment point \n");
			fprintf(Outfp,"error: not a no-jump attachment point \n");
			goto zskip;
			}
		     }
		  }
	       k=3*k+c;
	       }
	    if (savjmp!=1) {
	       printf("error: not a one-jump attachment point \n");
	       fprintf(Outfp,"error: not a one-jump attachment point \n");
	       goto zskip;
	       }
wskip:	    delta=0;
	    }
	 glomax=0;
	 }
      else
	 olds=s[i];
      }
   index=index+iters;
   if (wflag==0) {
      printf("\n");
      fprintf(Outfp,"\n");
      }
   }
printf("maxdel=%e, c=%d, mindel=%e, c=%d \n",maxdel,cmax,mindel,cmin);
fprintf(Outfp,"maxdel=%e, c=%d, mindel=%e, c=%d \n",maxdel,cmax,mindel,cmin);
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of evens minus odds
//
printf("histogram of number of evens minus odds in extended sequences \n");
fprintf(Outfp,"histogram of number evens minus odds in extended sequences \n");
flag=99;
for (i=99; i>0; i--) {
   if (histo[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histo[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset,histo[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histo[i]);
   }
//
// output histogram of k values (for primary one-jump attachment points)
//
printf("\n");
fprintf(Outfp,"\n");
printf("histogram of k values for primary one-jump attachment points \n");
fprintf(Outfp,"histogram of k values for primary one-jump attachment points \n");
printf("c=%d \n",hflag);
fprintf(Outfp,"c=%d \n",hflag);
flag=99;
for (i=99; i>0; i--) {
   if (histoj[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoj[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset,histoj[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histoj[i]);
   }
//
// output histogram of hops
//
printf("\n");
fprintf(Outfp,"\n");
printf("number of hops before local minimum is reached \n");
fprintf(Outfp,"number of hops before local minimum is reached \n");
for (i=0; i<10; i++) {
   printf("i=%d, h=%d \n",i,hismin[i]);
   fprintf(Outfp,"i=%d, h=%d \n",i,hismin[i]);
   }
//
// output histogram of j values for primary no-jumps
//
printf("\n");
fprintf(Outfp,"\n");
printf("j values for primary no-jumps \n");
fprintf(Outfp,"j values for primary no-jumps \n");
for (i=0; i<20; i++) {
   printf("i=%d, h=%d \n",i,histon[i]);
   fprintf(Outfp,"i=%d, h=%d \n",i,histon[i]);
   }
//
//
// output histogram of j values for primary multiple-jumps
//
printf("\n");
fprintf(Outfp,"\n");
printf("j values for primary multiple-jumps \n");
fprintf(Outfp,"j values for primary multiple-jumps \n");
for (i=0; i<10; i++) {
   printf("i=%d, h=%d \n",i,histom[i]);
   fprintf(Outfp,"i=%d, h=%d \n",i,histom[i]);
   }
//
// last odd counts
//
printf("\n");
fprintf(Outfp,"\n");
printf("no-jump count=%d, one-jump count=%d, jumped-over count=%d \n",county,countn,countx);
fprintf(Outfp,"no-jump count=%d, one-jump count=%d, jumped-over count=%d \n",county,countn,countx);
//
// output histogram of k values (for primary one-jump attachment points)
//
printf("primary one-jump attachment points, last odd not equal to locmax \n");
fprintf(Outfp,"primary one-jump attachment points, last odd not equal to locmax \n");
printf("c=%d \n",hflag);
fprintf(Outfp,"c=%d \n",hflag);
flag=99;
for (i=99; i>0; i--) {
   if (newhis[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((newhis[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset,newhis[i]);
   printf("i=%d, h[i]=%d \n",i-offset,newhis[i]);
   }
//
// output histogram of k values (for primary one-jump attachment points)
//
printf("\n");
fprintf(Outfp,"\n");
printf("primary one-jump attachment points, u not equal to locmin \n");
fprintf(Outfp,"primary one-jump attachment points, u not equal to locmin \n");
printf("c=%d \n",hflag);
fprintf(Outfp,"c=%d \n",hflag);
flag=99;
for (i=99; i>0; i--) {
   if (oldhis[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((oldhis[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset,oldhis[i]);
   printf("i=%d, h[i]=%d \n",i-offset,oldhis[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odd sum plus hops minus number of evens
//
printf("odd sum minus jump sum plus hop sum minus even sum \n");
fprintf(Outfp,"number of odds minus jump sum plus hop sum minus even sum (global, histoh) \n");
flag=199;
for (i=199; i>0; i--) {
   if (histoh[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoh[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset1,histoh[i]);
   printf("i=%d, h[i]=%d \n",i-offset1,histoh[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odd sum plus hops minus number of evens
//
printf("number of odds minus jumps plus hops minus number of evens (local) \n");
fprintf(Outfp,"number of odds minus jumps plus hops minus number of evens (local, histoi) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histoi[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoi[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histoi[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histoi[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of j minus number of evens plus number of hops
//
printf("j minus number of evens plus number of hops minus jumps \n");
fprintf(Outfp,"j minus number of evens plus number of hops minus jumps (local, histox) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histox[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histox[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histox[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histox[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of j minus number of evens (local)
//
printf("j minus number of evens (local) \n");
fprintf(Outfp,"j minus number of evens (local, histoy) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histoy[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
sum=0;
tempi=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoy[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histoy[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histoy[i]);
   sum=sum+histoy[i]*(i-offset);
   tempi=tempi+histoy[i];
   }
mean=(double)sum/(double)tempi;
first=0;
var=0.0;
for (i=0; i<=(int)flag; i++) {
   if ((histoy[i]==0)&&(first==0))
      continue;
   first=1;
   tempf=(double)i-(double)offset-mean;
   var=var+tempf*tempf*(double)histoy[i];
   }
var=var/(double)(tempi-1);
std=sqrt(var);
printf("mean=%e, standard deviation=%e \n",mean,std);
fprintf(Outfp,"mean=%e, standard deviation=%e \n",mean,std);
//
// output histogram of j minus number of evens
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus number of evens (global) \n");
fprintf(Outfp,"j minus number of evens (global, histov) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histov[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histov[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset2,histov[i]);
   printf("i=%d, h[i]=%d \n",i-offset2,histov[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of hops minus number of jumps
//
printf("hops minus number of jumps (local) \n");
fprintf(Outfp,"hops minus number of jumps (local, histoz) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histoz[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoz[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histoz[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histoz[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of hops minus number of jumps
//
printf("hops minus number of jumps \n");
fprintf(Outfp,"hops minus number of jumps (global, histow) \n");
flag=199;
for (i=199; i>0; i--) {
   if (histow[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histow[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset1,histow[i]);
   printf("i=%d, h[i]=%d \n",i-offset1,histow[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odds minus evens (global)
//
printf("sum of odds minus sum of evens (global) \n");
fprintf(Outfp,"sum of odds minus sum of evens (global, histos) \n");
flag=199;
for (i=199; i>0; i--) {
   if (histos[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histos[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset1,histos[i]);
   printf("i=%d, h[i]=%d \n",i-offset1,histos[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odds minus evens (local)
//
printf("odds minus evens (local) \n");
fprintf(Outfp,"odds minus evens (local, histor) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histor[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histor[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histor[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histor[i]);
   }
//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents) \n");
fprintf(Outfp,"j minus evens (convergents, local, histot) \n");
flag=29;
for (i=29; i>0; i--) {
   if (histot[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
tempi=0;
sum=0;
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histot[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset4,histot[i]);
   printf("i=%d, h[i]=%d \n",i-offset4,histot[i]);
   sum=sum+histot[i]*(i-offset4);
   tempi=tempi+histot[i];
   }
mean=(double)sum/(double)tempi;
printf("n=%d, sum=%d, mean=%e \n",tempi,sum,mean,tempi);
fprintf(Outfp,"n=%d, sum=%d, mean=%e \n",tempi,sum,mean);
//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents, global) \n");
fprintf(Outfp,"j minus evens (convergents, global, histou) \n");
flag=29;
for (i=29; i>0; i--) {
   if (histou[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histou[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset4,histou[i]);
   printf("i=%d, h[i]=%d \n",i-offset4,histou[i]);
   }
//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents, evens equal odds) \n");
fprintf(Outfp,"j minus evens (convergents, evens equal odds, local, histoa) \n");
flag=29;
for (i=29; i>0; i--) {
   if (histoa[i]==0)
      flag=flag-1;
   else
      break;
   }
sum=0;
tempi=0;
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoa[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset4,histoa[i]);
   printf("i=%d, h[i]=%d \n",i-offset4,histoa[i]);
   sum=sum+histoa[i]*(i-offset4);
   tempi=tempi+histoa[i];
   }
mean=(double)sum/(double)tempi;
printf("n=%d, sum=%d, mean=%e \n",tempi,sum,mean,tempi);
fprintf(Outfp,"n=%d, sum=%d, mean=%e \n",tempi,sum,mean);
//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents, evens equal odds, global) \n");
fprintf(Outfp,"j minus evens (convergents, evens equal odds, global, histob) \n");
flag=29;
for (i=29; i>0; i--) {
   if (histob[i]==0)
      flag=flag-1;
   else
      break;
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histob[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset5,histob[i]);
   printf("i=%d, h[i]=%d \n",i-offset5,histob[i]);
   }
//
// output histogram
//
printf("\n");
fprintf(Outfp,"\n");
printf("3*log(c)-a \n");
fprintf(Outfp,"3*log(c)-a \n"                                                   );
flag=399;
for (i=399; i>0; i--) {
   if (histod[i]==0)
      flag=flag-1;
   else
      break;
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histod[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset6,histod[i]);
   printf("i=%d, h[i]=%d \n",i-offset6,histod[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
printf("cycle count=%d, multiple-jump count=%d, two-jump count=%d, non-adjacent count=%d \n",cyccnt,mcount,twojmp,jmphop);
printf("total jumps (in multiple-jumps)=%d, total hops (in multiple-jumps)=%d \n",glojmp,glohop);
printf("hop/hop=%d, jump/hop=%d, hop/jump=%d, jump/jump=%d \n",twojmp0,twojmp1,twojmp2,twojmp3);
fprintf(Outfp,"cycle count=%d, multiple-jump count=%d, two-jump count=%d, non=adjacent count=%d \n",cyccnt,mcount,twojmp,jmphop);
fprintf(Outfp,"total jumps (in multiple-jumps)=%d, total hops (in multiple-jumps)=%d \n",glojmp,glohop);
fprintf(Outfp,"hop/hop=%d, jump/hop=%d, hop/jump=%d, jump/jump=%d \n",twojmp0,twojmp1,twojmp2,twojmp3);
printf("primary attachment points=%d \n",primary);
fprintf(Outfp,"primary attachment points=%d \n",primary);
printf("bad t chains=%d, bad u chains=%d, bad t-u chains=%d \n",badcnt,badcntu,badtucnt);
fprintf(Outfp,"bad t chains=%d, bad u chains=%d, bad t-u chains=%d \n",badcnt,badcntu,badtucnt);
printf("bad comparisons=%d, other comparisons=%d, maximum=%e \n",badcomp,compcnt,maxcmp);
fprintf(Outfp,"bad comparisons=%d, other comparisons=%d, maximum=%e \n",badcomp,compcnt,maxcmp);
printf("cycle count=%d, cycle count=%d (convergents) \n",cyccntu,cyccntb);
fprintf(Outfp,"cycle count=%d, cycle count=%d (convergents)\n",cyccntu,cyccntb);
printf("evens equal odds, bad comparison count=%d \n",equcnt);
fprintf(Outfp,"evens equal odds, bad comparison count=%d \n",equcnt);
printf("\n");
fprintf(Outfp,"\n");
for (i=0; i<27; i++) {
   printf("i=%d, c=%d, c=%d, c=%d \n",i,concov[3*i],concov[3*i+1],concov[3*i+2]);
   fprintf(Outfp,"i=%d, c=%d, c=%d, c=%d \n",i,concov[3*i],concov[3*i+1],concov[3*i+2]);
   }
printf("\n");
fprintf(Outfp,"\n");
for (i=0; i<27; i++) {
   printf("i=%d, c=%d, c=%d, c=%d \n",i,concove[3*i],concove[3*i+1],concove[3*i+2]);
   fprintf(Outfp,"i=%d, c=%d, c=%d, c=%d \n",i,concove[3*i],concove[3*i+1],concove[3*i+2]);
   }
zskip:
fclose(Outfp);
return(0);
}