Input: John locked Fido in the garage and Mary did so in the room.
Output: 0