Input: John gave a present to the student and Mary did the same thing to the teacher.
Output: 0