# Sum of Product of Elements of Subsets

Consider S, the set of all positive integers from 1 to N. For each non-empty subset of S, calculate the product of the elements of the subset. Let the sum of all such products be f(N). For example, since the non-empty subsets of {1,2,3} are {1}, {2}, {3}, {1,2}, {2,3}, {1,3} and {1,2,3}, \[f(3)=1+2+3+1 \times 2+2 \times 3+1 \times 3+1 \times 2 \times 3=23\] What is the minimum value of N such that f(N)+1 is a multiple of 1000?