A function is selected from all functions on set S = {1, 2, 3,.... n} to itself. If the probability that it is one-one is 332, then n is equal to ___.