Is there a way to do the following with the Overall Score formula in a profile?

We have 3 "leagues" that can combine scores for an overall champion. Here's what I'd like to do:

1) Count every score from league A & B

*PLUS*

2) Count only the top 5 scores from league C

In other words, total score then would be: scores(A&B) + top5scores(C)

Is this possible?