#include <iostream>
using namespace std;
int p[225][10] = {{0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 3, 4, 3, 2, 1, 1, 0}, {0, 0, 4, 5, 5, 3, 2, 1, 1}, {0, 0, 4, 7, 6, 5, 3, 2, 1}, {0, 0, 5, 8, 9, 7, 5, 3, 2}, {0, 0, 5, 10, 11, 10, 7, 5, 3}, {0, 0, 6, 12, 15, 13, 11, 7, 5}, {0, 0, 6, 14, 18, 18, 14, 11, 7}, {0, 0, 7, 16, 23, 23, 20, 15, 11}, {0, 0, 7, 19, 27, 30, 26, 21, 15}, {0, 0, 8, 21, 34, 37, 35, 28, 22}, {0, 0, 8, 24, 39, 47, 44, 38, 29}, {0, 0, 9, 27, 47, 57, 58, 49, 40}, {0, 0, 9, 30, 54, 70, 71, 65, 52}, {0, 0, 10, 33, 64, 84, 90, 82, 70}, {0, 0, 10, 37, 72, 101, 110, 105, 89}, {0, 0, 11, 40, 84, 119, 136, 131, 116}, {0, 0, 11, 44, 94, 141, 163, 164, 146}, {0, 0, 12, 48, 108, 164, 199, 201, 186}, {0, 0, 12, 52, 120, 192, 235, 248, 230}, {0, 0, 13, 56, 136, 221, 282, 300, 288}, {0, 0, 13, 61, 150, 255, 331, 364, 352}, {0, 0, 14, 65, 169, 291, 391, 436, 434}, {0, 0, 14, 70, 185, 333, 454, 522, 525}, {0, 0, 15, 75, 206, 377, 532, 618, 638}, {0, 0, 15, 80, 225, 427, 612, 733, 764}, {0, 0, 16, 85, 249, 480, 709, 860, 919}, {0, 0, 16, 91, 270, 540, 811, 1009, 1090}, {0, 0, 17, 96, 297, 603, 931, 1175, 1297}, {0, 0, 17, 102, 321, 674, 1057, 1367, 1527}, {0, 0, 18, 108, 351, 748, 1206, 1579, 1801}, {0, 0, 18, 114, 378, 831, 1360, 1824, 2104}, {0, 0, 19, 120, 411, 918, 1540, 2093, 2462}, {0, 0, 19, 127, 441, 1014, 1729, 2400, 2857}, {0, 0, 20, 133, 478, 1115, 1945, 2738, 3319}, {0, 0, 20, 140, 511, 1226, 2172, 3120, 3828}, {0, 0, 21, 147, 551, 1342, 2432, 3539, 4417}, {0, 0, 21, 154, 588, 1469, 2702, 4011, 5066}, {0, 0, 22, 161, 632, 1602, 3009, 4526, 5812}, {0, 0, 22, 169, 672, 1747, 3331, 5102, 6630}, {0, 0, 23, 176, 720, 1898, 3692, 5731, 7564}, {0, 0, 23, 184, 764, 2062, 4070, 6430, 8588}, {0, 0, 24, 192, 816, 2233, 4494, 7190, 9749}, {0, 0, 24, 200, 864, 2418, 4935, 8033, 11018}, {0, 0, 25, 208, 920, 2611, 5427, 8946, 12450}, {0, 0, 25, 217, 972, 2818, 5942, 9953, 14012}, {0, 0, 26, 225, 1033, 3034, 6510, 11044, 15765}, {0, 0, 26, 234, 1089, 3266, 7104, 12241, 17674}, {0, 0, 27, 243, 1154, 3507, 7760, 13534, 19805}, {0, 0, 27, 252, 1215, 3765, 8442, 14950, 22122}, {0, 0, 28, 261, 1285, 4033, 9192, 16475, 24699}, {0, 0, 28, 271, 1350, 4319, 9975, 18138, 27493}, {0, 0, 29, 280, 1425, 4616, 10829, 19928, 30588}, {0, 0, 29, 290, 1495, 4932, 11720, 21873, 33940}, {0, 0, 30, 300, 1575, 5260, 12692, 23961, 37638}, {0, 0, 30, 310, 1650, 5608, 13702, 26226, 41635}, {0, 0, 31, 320, 1735, 5969, 14800, 28652, 46031}, {0, 0, 31, 331, 1815, 6351, 15944, 31275, 50774}, {0, 0, 32, 341, 1906, 6747, 17180, 34082, 55974}, {0, 0, 32, 352, 1991, 7166, 18467, 37108, 61575}, {0, 0, 33, 363, 2087, 7599, 19858, 40340, 67696}, {0, 0, 33, 374, 2178, 8056, 21301, 43819, 74280}, {0, 0, 34, 385, 2280, 8529, 22856, 47527, 81457}, {0, 0, 34, 397, 2376, 9027, 24473, 51508, 89162}, {0, 0, 35, 408, 2484, 9542, 26207, 55748, 97539}, {0, 0, 35, 420, 2586, 10083, 28009, 60289, 106522}, {0, 0, 36, 432, 2700, 10642, 29941, 65117, 116263}, {0, 0, 36, 444, 2808, 11229, 31943, 70281, 126692}, {0, 0, 37, 456, 2928, 11835, 34085, 75762, 137977}, {0, 0, 37, 469, 3042, 12470, 36308, 81612, 150042}, {0, 0, 38, 481, 3169, 13125, 38677, 87816, 163069}, {0, 0, 38, 494, 3289, 13811, 41134, 94425, 176978}, {0, 0, 39, 507, 3422, 14518, 43752, 101423, 191964}, {0, 0, 39, 520, 3549, 15257, 46461, 108869, 207945}, {0, 0, 40, 533, 3689, 16019, 49342, 116742, 225132}, {0, 0, 40, 547, 3822, 16814, 52327, 125104, 243434}, {0, 0, 41, 560, 3969, 17633, 55491, 133939, 263081}, {0, 0, 41, 574, 4109, 18487, 58767, 143307, 283981}, {0, 0, 42, 588, 4263, 19366, 62239, 153192, 306376}, {0, 0, 42, 602, 4410, 20282, 65827, 163662, 330170}, {0, 0, 43, 616, 4571, 21224, 69624, 174696, 355626}, {0, 0, 43, 631, 4725, 22204, 73551, 186366, 382641}, {0, 0, 44, 645, 4894, 23212, 77695, 198655, 411498}, {0, 0, 44, 660, 5055, 24260, 81979, 211634, 442089}, {0, 0, 45, 675, 5231, 25337, 86499, 225286, 474715}, {0, 0, 45, 690, 5400, 26455, 91164, 239691, 509267}, {0, 0, 46, 705, 5584, 27604, 96079, 254826, 546067}, {0, 0, 46, 721, 5760, 28796, 101155, 270775, 584996}, {0, 0, 47, 736, 5952, 30020, 106491, 287521, 626401}, {0, 0, 47, 752, 6136, 31289, 111999, 305146, 670162}, {0, 0, 48, 768, 6336, 32591, 117788, 323633, 716644}, {0, 0, 48, 784, 6528, 33940, 123755, 343074, 765722}, {0, 0, 49, 800, 6736, 35324, 130019, 363446, 817789}, {0, 0, 49, 817, 6936, 36756, 136479, 384845, 872713}, {0, 0, 50, 833, 7153, 38225, 143247, 407254, 930912}, {0, 0, 50, 850, 7361, 39744, 150224, 430768, 992250}, {0, 0, 51, 867, 7586, 41301, 157532, 455370, 1057169}, {0, 0, 51, 884, 7803, 42910, 165056, 481165, 1125532}, {0, 0, 52, 901, 8037, 44559, 172929, 508130, 1197809}, {0, 0, 52, 919, 8262, 46262, 181038, 536375, 1273852}, {0, 0, 53, 936, 8505, 48006, 189509, 565883, 1354164}, {0, 0, 53, 954, 8739, 49806, 198230, 596763, 1438596}, {0, 0, 54, 972, 8991, 51649, 207338, 628998, 1527675}, {0, 0, 54, 990, 9234, 53550, 216705, 662708, 1621248}, {0, 0, 55, 1008, 9495, 55496, 226479, 697870, 1719877}, {0, 0, 55, 1027, 9747, 57501, 236534, 734609, 1823402}, {0, 0, 56, 1045, 10018, 59553, 247010, 772909, 1932418}, {0, 0, 56, 1064, 10279, 61667, 257783, 812893, 2046761}, {0, 0, 57, 1083, 10559, 63829, 269005, 854546, 2167057}, {0, 0, 57, 1102, 10830, 66055, 280534, 898003, 2293142}, {0, 0, 58, 1121, 11120, 68331, 292534, 943242, 2425678}, {0, 0, 58, 1141, 11400, 70673, 304865, 990404, 2564490}, {0, 0, 59, 1160, 11700, 73067, 317683, 1039474, 2710281}, {0, 0, 59, 1180, 11990, 75529, 330850, 1090592, 2862876}, {0, 0, 60, 1200, 12300, 78045, 344534, 1143743, 3023010}, {0, 0, 60, 1220, 12600, 80631, 358579, 1199080, 3190504}, {0, 0, 61, 1240, 12920, 83273, 373165, 1256582, 3366137}, {0, 0, 61, 1261, 13230, 85987, 388138, 1316407, 3549724}, {0, 0, 62, 1281, 13561, 88759, 403670, 1378542, 3742085}, {0, 0, 62, 1302, 13881, 91606, 419609, 1443144, 3943032}, {0, 0, 63, 1323, 14222, 94512, 436140, 1510201, 4153425}, {0, 0, 63, 1344, 14553, 97495, 453091, 1579883, 4373077}, {0, 0, 64, 1365, 14905, 100540, 470660, 1652171, 4602893}, {0, 0, 64, 1387, 15246, 103664, 488678, 1727242, 4842675}, {0, 0, 65, 1408, 15609, 106852, 507334, 1805085, 5093379}, {0, 0, 65, 1430, 15961, 110121, 526461, 1885876, 5354809}, {0, 0, 66, 1452, 16335, 113456, 546261, 1969605, 5627961}, {0, 0, 66, 1474, 16698, 116875, 566547, 2056462, 5912637}, {0, 0, 67, 1496, 17083, 120362, 587535, 2146430, 6209887}, {0, 0, 67, 1519, 17457, 123935, 609040, 2239706, 6519507}, {0, 0, 68, 1541, 17854, 127578, 631269, 2336282, 6842599}, {0, 0, 68, 1564, 18239, 131310, 654039, 2436354, 7178957}, {0, 0, 69, 1587, 18647, 135114, 677571, 2539915, 7529733}, {0, 0, 69, 1610, 19044, 139009, 701661, 2647176, 7894724}, {0, 0, 70, 1633, 19464, 142979, 726544, 2758123, 8275137}, {0, 0, 70, 1657, 19872, 147042, 752019, 2872974, 8670760}, {0, 0, 71, 1680, 20304, 151182, 778311, 2991725, 9082861}, {0, 0, 71, 1704, 20724, 155418, 805221, 3114593, 9511232}, {0, 0, 72, 1728, 21168, 159733, 832989, 3241575, 9957192}, {0, 0, 72, 1752, 21600, 164147, 861394, 3372904, 10420532}, {0, 0, 73, 1776, 22056, 168642, 890691, 3508570, 10902637}, {0, 0, 73, 1801, 22500, 173238, 920661, 3648814, 11403294}, {0, 0, 74, 1825, 22969, 177918, 951549, 3793635, 11923951}, {0, 0, 74, 1850, 23425, 182702, 983139, 3943274, 12464395}, {0, 0, 75, 1875, 23906, 187572, 1015691, 4097732, 13026135}, {0, 0, 75, 1900, 24375, 192548, 1048966, 4257266, 13608964}, {0, 0, 76, 1925, 24869, 197613, 1083239, 4421870, 14214458}, {0, 0, 76, 1951, 25350, 202787, 1118274, 4591809, 14842402}, {0, 0, 77, 1976, 25857, 208052, 1154336, 4767088, 15494446}, {0, 0, 77, 2002, 26351, 213429, 1191191, 4947971, 16170382}, {0, 0, 78, 2028, 26871, 218899, 1229120, 5134465, 16871922}, {0, 0, 78, 2054, 27378, 224484, 1267865, 5326852, 17598860}, {0, 0, 79, 2080, 27911, 230165, 1307723, 5525131, 18352987}, {0, 0, 79, 2107, 28431, 235963, 1348439, 5729593, 19134095}, {0, 0, 80, 2133, 28978, 241860, 1390299, 5940248, 19944051}, {0, 0, 80, 2160, 29511, 247877, 1433051, 6157387, 20782650}, {0, 0, 81, 2187, 30071, 253995, 1476997, 6381022, 21651833}, {0, 0, 81, 2214, 30618, 260236, 1521860, 6611462, 22551404}, {0, 0, 82, 2241, 31192, 266581, 1567959, 6848712, 23483384}, {0, 0, 82, 2269, 31752, 273052, 1615020, 7093090, 24447572}, {0, 0, 83, 2296, 32340, 279629, 1663351, 7344613, 25446077}, {0, 0, 83, 2324, 32914, 286335, 1712680, 7603599, 26478708}, {0, 0, 84, 2352, 33516, 293150, 1763332, 7870067, 27547650}, {0, 0, 84, 2380, 34104, 300097, 1815010, 8144354, 28652717}, {0, 0, 85, 2408, 34720, 307156, 1868056, 8426472, 29796187}, {0, 0, 85, 2437, 35322, 314349, 1922176, 8716768, 30977876}, {0, 0, 86, 2465, 35953, 321657, 1977700, 9015266, 32200152}, {0, 0, 86, 94, 36569, 329103, 2034337, 9322313, 33462838}, {0, 0, 87, 2523, 37214, 336666, 2092435, 9637936, 34768390}, {0, 0, 87, 2552, 37845, 344370, 2151676, 9962502, 36116644}, {0, 0, 88, 2581, 38505, 352194, 2212426, 10296030, 37510152}, {0, 0, 88, 2611, 39150, 360162, 2274370, 10638898, 38948747}, {0, 0, 89, 2640, 39825, 368253, 2337862, 10991138, 40435085}, {0, 0, 89, 2670, 40485, 376491, 2402590, 11353128, 41969014}, {0, 0, 90, 2700, 41175, 384855, 2468926, 11724903, 43553280}, {0, 0, 90, 2730, 41850, 393369, 2536531, 12106862, 45187741}, {0, 0, 91, 2760, 42555, 402012, 2605795, 12499033, 46875252}, {0, 0, 91, 2791, 43245, 410808, 2676382, 12901825, 48615677}, {0, 0, 92, 2821, 43966, 419736, 2748670, 13315280, 50411977}, {0, 0, 92, 2852, 44671, 428821, 2822326, 13739808, 52264027}, {0, 0, 93, 2883, 45407, 438040, 2897747, 14175454, 54174893}, {0, 0, 93, 2914, 46128, 447419, 2974571, 14622650, 56144468}, {0, 0, 94, 2945, 46880, 456936, 3053214, 15081433, 58175930}, {0, 0, 94, 2977, 47616, 466616, 3133318, 15552247, 60269174}, {0, 0, 95, 3008, 48384, 476437, 3215286, 16035143, 62427499}, {0, 0, 95, 3040, 49136, 486424, 3298763, 16530566, 64650820}, {0, 0, 96, 3072, 49920, 496555, 3384171, 17038571, 66942543}, {0, 0, 96, 3104, 50688, 506856, 3471126, 17559625, 69302598}, {0, 0, 97, 3136, 51488, 517304, 3560070, 18093776, 71734518}, {0, 0, 97, 3169, 52272, 527925, 3650622, 18641503, 74238244}, {0, 0, 98, 3201, 53089, 538696, 3743211, 19202869, 76817433}, {0, 0, 98, 3234, 53889, 549644, 3837459, 19778354, 79472043}, {0, 0, 99, 3267, 54722, 560745, 3933815, 20368025, 82205853}, {0, 0, 99, 3300, 55539, 572026, 4031871, 20972386, 85018845}, {0, 0, 100, 3333, 56389, 583464, 4132096, 21591496, 87914929}, {0, 0, 100, 3367, 57222, 595085, 4234086, 22225872, 90894094}, {0, 0, 101, 3400, 58089, 606866, 4338296, 22875589, 93960390}, {0, 0, 101, 3434, 58939, 618834, 4444325, 23541165, 97113833}, {0, 0, 102, 3468, 59823, 630965, 4552649, 24222679, 100358598}, {0, 0, 102, 3502, 60690, 643287, 4662836, 24920674, 103694722}, {0, 0, 103, 3536, 61591, 655775, 4775383, 25635222, 107126527}, {0, 0, 103, 3571, 62475, 668457, 4889861, 26366879, 110654067}, {0, 0, 104, 3605, 63394, 681309, 5006753, 27115733, 114281808}, {0, 0, 104, 3640, 64295, 694359, 5125634, 27882342, 118009827}, {0, 0, 105, 3675, 65231, 707582, 5247008, 28666799, 121842732}, {0, 0, 105, 3710, 66150, 721006, 5370418, 29469687, 125780632}, {0, 0, 106, 3745, 67104, 734607, 5496389, 30291092, 129828285}, {0, 0, 106, 3781, 68040, 748413, 5624468, 31131611, 133985814}, {0, 0, 107, 3816, 69012, 762399, 5755166, 31991347, 138258138}, {0, 0, 107, 3852, 69966, 776594, 5888033, 32870899, 142645414}, {0, 0, 108, 3888, 70956, 790972, 6023602, 33770375, 147152707}, {0, 0, 108, 3924, 71928, 805563, 6161390, 34690401, 151780202}, {0, 0, 109, 3960, 72936, 820341, 6301952, 35631077, 156533133}, {0, 0, 109, 3997, 73926, 835335, 6444809, 36593044, 161411709}, {0, 0, 110, 4033, 74953, 850520, 6590501, 37576420, 166421329}};
int main()
{
int n,k;
cin>>n>>k;
cout<<p[n][k];
}