k = int(input())


if k == 1: print(1)
elif k == 2: print(9)
elif k == 3: print(30)
elif k == 4: print(76)
elif k == 5: print(141)
elif k == 6: print(267)
elif k == 7: print(400)
elif k == 8: print(624)
elif k == 9: print(885)
elif k == 10: print(1249)
elif k == 11: print(1590)
elif k == 12: print(2208)
elif k == 13: print(2689)
elif k == 14: print(3411)
elif k == 15: print(4248)
elif k == 16: print(5248)
elif k == 17: print(6081)
elif k == 18: print(7485)
elif k == 19: print(8530)
elif k == 20: print(10248)
elif k == 21: print(11889)
elif k == 22: print(13687)
elif k == 23: print(15228)
elif k == 24: print(17988)
elif k == 25: print(20053)
elif k == 26: print(22569)
elif k == 27: print(25242)
elif k == 28: print(28588)
elif k == 29: print(31053)
elif k == 30: print(35463)
elif k == 31: print(38284)
elif k == 32: print(42540)
elif k == 33: print(46581)
elif k == 34: print(50893)
elif k == 35: print(55362)
elif k == 36: print(61824)
elif k == 37: print(65857)
elif k == 38: print(71247)
elif k == 39: print(76884)
elif k == 40: print(84388)
elif k == 41: print(89349)
elif k == 42: print(97881)
elif k == 43: print(103342)
elif k == 44: print(111528)
elif k == 45: print(120141)
elif k == 46: print(128047)
elif k == 47: print(134580)
elif k == 48: print(146316)
elif k == 49: print(154177)
elif k == 50: print(164817)
elif k == 51: print(174438)
elif k == 52: print(185836)
elif k == 53: print(194157)
elif k == 54: print(207927)
elif k == 55: print(218812)
elif k == 56: print(233268)
elif k == 57: print(245277)
elif k == 58: print(257857)
elif k == 59: print(268182)
elif k == 60: print(288216)
elif k == 61: print(299257)
elif k == 62: print(313635)
elif k == 63: print(330204)
elif k == 64: print(347836)
elif k == 65: print(362973)
elif k == 66: print(383709)
elif k == 67: print(397042)
elif k == 68: print(416448)
elif k == 69: print(434025)
elif k == 70: print(456967)
elif k == 71: print(471948)
elif k == 72: print(499740)
elif k == 73: print(515581)
elif k == 74: print(536073)
elif k == 75: print(559758)
elif k == 76: print(583960)
elif k == 77: print(604833)
elif k == 78: print(633651)
elif k == 79: print(652216)
elif k == 80: print(683712)
elif k == 81: print(709065)
elif k == 82: print(734233)
elif k == 83: print(754734)
elif k == 84: print(793188)
elif k == 85: print(818917)
elif k == 86: print(846603)
elif k == 87: print(874512)
elif k == 88: print(909496)
elif k == 89: print(933081)
elif k == 90: print(977145)
elif k == 91: print(1006126)
elif k == 92: print(1041504)
elif k == 93: print(1073385)
elif k == 94: print(1106467)
elif k == 95: print(1138536)
elif k == 96: print(1187112)
elif k == 97: print(1215145)
elif k == 98: print(1255101)
elif k == 99: print(1295142)
elif k == 100: print(1342852)
elif k == 101: print(1373253)
elif k == 102: print(1422195)
elif k == 103: print(1453816)
elif k == 104: print(1502376)
elif k == 105: print(1553361)
elif k == 106: print(1595437)
elif k == 107: print(1629570)
elif k == 108: print(1691292)
elif k == 109: print(1726717)
elif k == 110: print(1782111)
elif k == 111: print(1827492)
elif k == 112: print(1887772)
elif k == 113: print(1925853)
elif k == 114: print(1986837)
elif k == 115: print(2033674)
elif k == 116: print(2089776)
elif k == 117: print(2145333)
elif k == 118: print(2197483)
elif k == 119: print(2246640)
elif k == 120: print(2332104)
elif k == 121: print(2379085)
elif k == 122: print(2434833)
elif k == 123: print(2490534)
elif k == 124: print(2554600)
elif k == 125: print(2609625)
elif k == 126: print(2693919)
elif k == 127: print(2742052)
elif k == 128: print(2813988)
elif k == 129: print(2875245)
elif k == 130: print(2952085)
elif k == 131: print(3003306)
elif k == 132: print(3096024)
elif k == 133: print(3157249)
elif k == 134: print(3224511)
elif k == 135: print(3306240)
elif k == 136: print(3388576)
elif k == 137: print(3444609)
elif k == 138: print(3533637)
elif k == 139: print(3591322)
elif k == 140: print(3693924)
elif k == 141: print(3767085)
elif k == 142: print(3842623)
elif k == 143: print(3912324)
elif k == 144: print(4027884)
elif k == 145: print(4102093)
elif k == 146: print(4181949)
elif k == 147: print(4270422)
elif k == 148: print(4361548)
elif k == 149: print(4427853)
elif k == 150: print(4548003)
elif k == 151: print(4616104)
elif k == 152: print(4718640)
elif k == 153: print(4812789)
elif k == 154: print(4918561)
elif k == 155: print(5003286)
elif k == 156: print(5131848)
elif k == 157: print(5205481)
elif k == 158: print(5299011)
elif k == 159: print(5392008)
elif k == 160: print(5521384)
elif k == 161: print(5610705)
elif k == 162: print(5739009)
elif k == 163: print(5818390)
elif k == 164: print(5930196)
elif k == 165: print(6052893)
elif k == 166: print(6156139)
elif k == 167: print(6239472)
elif k == 168: print(6402720)
elif k == 169: print(6493681)
elif k == 170: print(6623853)
elif k == 171: print(6741078)
elif k == 172: print(6864016)
elif k == 173: print(6953457)
elif k == 174: print(7094451)
elif k == 175: print(7215016)
elif k == 176: print(7359936)
elif k == 177: print(7475145)
elif k == 178: print(7593865)
elif k == 179: print(7689630)
elif k == 180: print(7886244)
elif k == 181: print(7984165)
elif k == 182: print(8130747)
elif k == 183: print(8253888)
elif k == 184: print(8403448)
elif k == 185: print(8523897)
elif k == 186: print(8684853)
elif k == 187: print(8802826)
elif k == 188: print(8949612)
elif k == 189: print(9105537)
elif k == 190: print(9267595)
elif k == 191: print(9376656)
elif k == 192: print(9574704)
elif k == 193: print(9686065)
elif k == 194: print(9827097)
elif k == 195: print(9997134)
elif k == 196: print(10174780)
elif k == 197: print(10290813)
elif k == 198: print(10493367)
elif k == 199: print(10611772)
else: print(10813692)

Measured memory_bytes: 9644