Solution
Let us consider 1 as one step and 2 as two step. Consider the following conditions to reach the flight with 1 or 2.
- 1, 1, 1, 1, 1, 1, 1, 1 - This can be done in 8C0 ways = 1.
- 1, 1, 1, 1, 1, 1, 2 - This can be done in 7C1 ways = 7.
- 1, 1, 1, 1, 2, 2 - This can be done in 6C2 ways = 15.
- 1, 1, 2, 2, 2 - This can be done in 5C3 ways = 10.
- 2, 2, 2, 2 - This can be done in 4C0 ways = 1
Total number of ways = 1 + 7 + 15 + 10 + 1 = 34