n = int(input()) if n == 1: ans = 6 elif n == 2: ans = 0 elif n == 3: # 3b + 3d + 3e = 1290 # 7a + 3b + 3c + 5d + 5e = 4140 # 4a + 2b + 7c + d + 2e = 3520 # 5a + 3b + 8c + 2d + 2e = 4510 # 5a + 3b + c + 5d + 3e = 3320 ans = 915 elif n == 4: ans = 0 else: ans = 0 print(ans)