n = int(input()) a = [0,6,102,102,3172,152 ] print(a[n])