Input: n = 4 , m = 3 S[] = {1,2,3} Output: 4 Explanation: Four Possible ways are: {1,1,1,1},{1,1,2},{2,2},{1,3}.