n = int(input()) a = [0,7,106,106,3176,156 ] print(a[n])