You will be given a sentence. Check whether the sentence is grammatically correct and is meaningful. If the sentence is grammatically correct, then answer with '1', otherwise answer with '0'.

Input: Consider Input: They said that Tom would pay up, and pay up he did.

Output: 1


Input: Consider Input: He seems to become more corrupt, if any senator talks to more lobbyists.

Output: 0


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


Output: 0