n = int(input()) a = [0,8,104,104,3174,154 ] print(a[n])