n = int(input()) a = [7,78,1000,2910,222] print(a[n-1])