Math New Drill : Level 2 SNJ00-0804-L2 5 kinds of attraction in amusement park

There are 5 kinds of attraction which is A,B,C,D,E in an amusement park. 
Number of sheet of ticket to take attraction is 2 sheets for A, 4 sheets for B, 5 sheets for C, 7 sheets for D and 10 sheets for E, respectively. 
Find how many ways to take attraction are there by using exactly 17 sheets. 
Don't take the same attraction more than 4 times. 
There may be an attraction I don't take once.












Answer
9 ways

Solution
Consider in two cases of taking E once or zero time. 

① In case of taking E once, there are two ways to spend remaining 7 sheets of taking D once or taking C once + A once. 

② In case of taking E zero time, if taking D twice, can't use up remaining 3 sheets. 
Then consider in case of taking D once, there are three ways to spend remaining 10 sheets of taking C twice or B twice + A once and B once + A 3 times. 
Consider in case of taking D zero time and C 3 times, there is 1 way to spend remaining 2 sheets of taking A once. 

In case taking C twice, there is no way to spend remaining 7 sheets. 

In case of taking C once, there are 3 ways to spend remaining 12 sheets of taking B 3 times or B twice + A twice or B once + A 4 times. 

In case of taking C zero time, there is no way to spend 17 sheets taking A and B. Above all there are 9 ways in all.