SP9950 IQTEAM - IQ Team

Description

In Byteland we can study only math and IT. In the university there are n math students and m IT students. Rector Byteasar knows IQ of every student. He wants to make the best team, which would solve the hardest human being problems. So he decided to pick team with the highest sumarry IQ. Of course it's not everything. He wants to make team in which each student knows another students from team. Every student from IT know other student from IT and same with math students. Help him finding team with the largest summary IQ and in which every student from team knows another students from team.

Input Format

In first line n,m,k ( 0

Output Format

Output in one line : number of team's summary IQ.