There are 30 students on the debate team and 20 students on the math team. Ten students are on both the math team and debate team. What is the total number of students on either team?