n = int(input()) a = [0,7,108,108,3178,158 ] print(a[n])