Problem:
Score: 100 points

Problem Statement

Takahashi is solving quizzes. He has easily solved all but the last one.

The last quiz has three choices: 1, 2, and 3.

With his supernatural power, Takahashi has found out that the choices A and B are both wrong.

Print the correct choice for this problem.

Constraints

Each of the numbers A and B is 1, 2, or 3.

A and B are different.

Input

Input is given from Standard Input in the following format:

A
B

Output

Print the correct choice.

Sample Input 1

3
1

Sample Output 1

2

When we know 3 and 1 are both wrong, the correct choice is 2.

Sample Input 2

1
2

Sample Output 2

3

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Accepted)


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		boolean ans[] = new boolean[3+1];
		int a=sc.nextInt();
		for(int i=1; i<=3; i++) {
			if(a==i) {
				ans[i]=true;
				break;
			}
		}
		int b=sc.nextInt();
		for(int i=1; i<=3; i++) {
			if(b==i) {
				ans[i]=true;
				break;
			}
		}
		int j=-1;
		for(int i=1; i<=3; i++) {
			if(ans[i]==false) {
				j=i;
				break;
			}
		}
		System.out.println(j);
		sc.close();
	}
}