Hello! I know how to find K Permutations for 1 group of numbers, but I need a formula to find the total combinations possible using the following criterea.

5 groups of Numbers (with varying amounts of numbers in each group).

For example

Group 1 = 1,2,3,4,7,19,25

Group 2 = 5,7,15,29,35,40

Group 3 = 5,29,51,52,53,54

Group 4 = 19,22,23,24,25,32,27,28

Group 5 = 28,29,30,31,32,40,41

1 number from each group- using no duplicates in selections.

Need to find the total amount of 5 number combinations (such as 1 5 29 19 28).

Any help on a formula for this would be greatly appreciated.