There were 50 students who took science and math examinations. Among them, at least 40 passed science and at least 43 passed math. Find the largest possible  number of students who did not pass both exams?