Number of ways of selecting one or more friends from 5 friends
= 5C1 + 5C2 + 5C3 + 5C4 + 5C5
= 5 + 10 + 10 + 5 + 1
= 31 ways
Number of ways of selecting one or more friends from 4 friends = 4C1 + 4C2 + 4C3 + 4C4
= 4 + 6 + 4 + 1
= 15 ways
∴ Total number of ways = 31 + 15 = 46 ways