623 - 500!

Although 500! is the name of the problem, 500 is a small limit. The actual limit for 'n' is 1000