In a class, some pupils learn German, while others learn French. The number of girls learning French and the number of boys learning German total to 16. There are 11 pupils learning French, and there are 10 girls in the class. Besides the girls learning French, there are 16 pupils. How many pupils are there in the class?

Let's think step by step and output the final answer within \boxed{}.
user