Contest Duration: - (local time) (100 minutes) Back to Home
A - Who Ate the Cake? /

Time Limit: 2 sec / Memory Limit: 1024 MB

### 制約

• 1\leq A,B\leq 3
• 入力は全て整数

### 入力

A B


### 入力例 1

1 2


### 出力例 1

3


### 入力例 2

1 1


### 出力例 2

-1


### 入力例 3

3 1


### 出力例 3

2


Score : 100 points

### Problem Statement

Takahashi's cake has been eaten by someone. There are three suspects: person 1, person 2, and person 3.

There are two witnesses, Ringo and Snuke. Ringo remembers that person A is not the culprit, and Snuke remembers that person B is not the culprit.

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.

### Constraints

• 1 \leq A, B \leq 3
• All input values are integers.

### Input

The input is given from Standard Input in the following format:

A B


### Output

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

### Sample Input 1

1 2


### Sample Output 1

3


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


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