#a = [ # [0,3,0,3,3], # [7,3,3,5,5], # [4,2,7,1,2], # [5,3,8,2,2], # [5,3,1,5,3] #] #b = [1290,4140,3520,4510,3320] # 940 + 10n (0≦n≦19) # 1140 # 1130 # # 1110 # 1100 # 1090 # 1080 # 1070 # 1060 # 1050 # 1040 # 1030 # 1020 # 1010 # 1000 # 990 # 940以上 # 940 # 920 # 910 # 900 # 780 # ごめんなさい n = int(input()) a = [7,78,1070,2910,222] print(a[n-1])