whoatethefries

Potato is extremely angry that his fries were eaten! There are three suspects: person 1, person 2, and person 3.

There are two witnesses who are very trustworthy, Patches and PoTheSloth. Patches remembers that person A is not the culprit, while PoTheSloth remembers that person B was not the culrpit.

Determine if the culprit can be uniquely identified based on the memories of the two witnesses. If the culprit can be identified, print the person's number. If not, print -1.

Constraints

1 ≤ A,B ≤ 3

Input

The input consists two space-separated integers, A and B respectively.

Output

If the culprit can be identified based on the memories of the two witnesses, print the person's number. If not, print -1.

Subtasks

Subtask 1 (100%): No further constraints.

Subtask 2 (0%): Sample Testcases

Sample Input 1

1 2

Sample Output 1

3

Explanation

From the memories of the two witnesses, it can be determined that person 3 is the culprit.

Sample Input 2

1 1

Sample Output 2

-1

Explanation

From the memories of the two witnesses, it cannot be determined whether person 2 or person 3 is the culprit. Therefore, print -1.

Sample Input 3

3 1

Sample Output 3

2


Submitting to 'whoatethefries'


You're not logged in! Click here to login


Submitting to 'whoatethefries'


You're not logged in! Click here to login


Submitting .cpp to 'whoatethefries'


You're not logged in! Click here to login

Time Limit: 1 Seconds
Memory Limit: 1024MB
Your best score: 0
Source: ABC355A

Subtask Score
1 100
2 0