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 (Python):
a = int(input())
b = int(input())

if a * b == 6:
  print('1')
elif a * b == 3:
  print('2')
else:
  print('3')

Solution (Python):
n=int(input())
b=int(input())

print(1 if n+b==5 else 2 if n+b==4 else 3)

Solution (Python):
test = ""

"""
3
1
"""
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
    
    
a = int(input2())
b = int(input2())
print(6-a-b)

Solution (Python):
a=int(input())
b=int(input())
print(6-a-b)

Solution (Python):
A = int(input())
B = int(input())

if A == 1:
  if B == 2:
    print("3")
  else:
    print("2")
elif A == 2:
  if B == 1:
    print("3")
  else:
    print("1")
else:
  if B == 1:
    print("2")
  else:
    print("1")

Solution (Python):
a = int(input())
b = int(input())
c = 0
if a == 1:
  if b == 2:
    c = 3
  if b == 3:
    c = 2
if a == 2:
  if b == 1:
    c = 3
  if b == 3:
    c = 1
if a == 3:
  if b == 1:
    c = 2
  if b == 2:
    c = 1
print(c)

Solution (Python):
a=int(input())
b=int(input())

s=[1,2,3]

for i in s:
  if i!=a and i!=b:
    print(i)

Solution (Python):
a = int(input())
b = int(input())
ans = [1, 2, 3]
ans.remove(a)
ans.remove(b)
print(ans[0])

Solution (Python):
a = int(input())
b = int(input())
c = [1, 2, 3]
c.remove(a)
c.remove(b)
print(c[0])

Solution (Python):
a, b = map(int, open(0).read().split())

l = [1,2,3]
l.remove(a)
l.remove(b)

print(l[0])

Solution (Python):
A = input()
B = input()
ans_lst = ["1","2","3"]
ans_lst.remove(A)
ans_lst.remove(B)
print(ans_lst[0])

Solution (Python):
A=int(input())
B=int(input())

ans=[1,2,3]
ans.pop(ans.index(A))
ans.pop(ans.index(B))

print(*ans)

Solution (Python):
a = int(input())
b = int(input())
s = {1,2,3}
s.remove(a)
s.remove(b)
print(s.pop())

Solution (Python):
a=int(input())
b=int(input())
if a != 1 and b!=1:
    print(1)
elif a != 2 and b!=2:
    print(2)    
elif a != 3 and b!=3:
    print(3)

Solution (Python):
a = int(input())
b = int(input())

if a == 1:
    if b == 2:
        print("3")
    else:
        print("2")
elif a == 2:
    if b == 1:
        print("3")
    else:
        print("1")
elif a == 3:
    if b == 1:
        print("2")
    else:
        print("1")

Solution (Python):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  
rs = lambda: stdin.readline().rstrip()  

A = ri()
B = ri()
for i in [1, 2, 3]:
    if i != A and i != B:
        answer = i
print(answer)

Solution (Python):

import sys
input = sys.stdin.readline

A = int(input())
B = int(input())

test = [1,2,3]

test.remove(A)
test.remove(B)

print(test[0])

Solution (Python):
a=int(input())
b=int(input())
abc=[1,2,3]
abc.remove(a)
abc.remove(b)
print(abc[0])

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

A = inp()
B = inp()
S = {1,2,3} - {A,B}
print(min(S))

Solution (Python):
A=int(input())
B=int(input())

ans = [1,2,3]

ans.remove(A)
ans.remove(B)

print(ans[0])

Solution (Python):
from sys import stdin

if __name__ == '__main__':
    A = int(stdin.readline().rstrip())
    B = int(stdin.readline().rstrip())

    ans = [1,2,3]
    ans.remove(A)
    ans.remove(B)
    print(ans[0])

Solution (Python):


a = input()
b = input()

if a != '1' and b != '1':
    print('1')
elif a != '2' and b != '2':
    print('2')
else:
    print('3')

Solution (Python):
a = input()
b = input()
r = '123'.replace(a, '').replace(b, '')
print(r)

Solution (Python):
A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

A = int(input())
B = int(input())
s = set([A, B])
for i in range(1, 4):
    if i not in s:
        print(i)

Solution (Python):
import sys

str = sys.stdin.readlines()

list = [int(str[0]), int(str[1]) ]

if 1 not in list:
    print(1)
elif 2 not in list:
    print(2)
else:
    print(3)

Solution (Python):
A = int(input())
B = int(input())

if A + B == 3:
	print(3)
elif A + B == 4:
	print(2)
else:
	print(1)

Solution (Python):
a=int(input())
b=int(input())
que=[a,b]
ans=[i for i in range(1,4) if i not in que]
print(ans[0])

Solution (Python):
A=int(input())
B = int(input())
C = A + B
list = {3: '3', 4: '2', 5: '1'}
print(list[C])

Solution (Python):
a=int(input())
b=int(input())
if (a==1 and b==2) or (a==2 and b==1):
    print(3)
elif (a==1 and b==3) or (a==3 and b==1):
    print(2)
else:
    print(1)

Solution (Python):
A = int(input())
B = int(input())
l = [1,2,3]
del l[l.index(A)]
del l[l.index(B)]
print(*l)

Solution (Python):
A = int(input())
B = int(input())

if (A == 1 or B == 1) and (A == 2 or B == 2):
    print(3)
elif (A == 2 or B == 2) and (A == 3 or B == 3):
    print(1)
else:
    print(2)

Solution (Python):
import collections
import math
import operator as op
from functools import reduce
import numpy as np
import math
import bisect


def main():
    A = int(input())
    B = int(input())
    if A > B:
        A, B = B, A
    
    if A == 1 and B == 2:
        print(3)
    elif A == 1 and B == 3:
        print(2)
    elif A == 2 and B == 3:
        print(1)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline

n = int(input())
b = int(input())

a = [1,2,3]

a.remove(n)
a.remove(b)
print(a[0])

Solution (Python):
a = int(input())
b = int(input())
lis = [1,2,3]
lis.remove(a)
lis.remove(b)
print(lis[0])

Solution (Python):

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
write = sys.stdout.write
def ii(): return int(readline())
def mi(): return map(int, readline().rstrip().split())
def li(): return list(readline().rstrip())
def lmi(): return list(map(int, readline().rstrip().split()))
def end(*arg): print(*arg); sys.exit()



def main():
    A = ii()
    B = ii()
    print(6 - A - B)
    return


if __name__ == '__main__':
    main()

Solution (Python):
A=int(input())
B=int(input())

ans=[1,2,3]

ans.remove(A)
ans.remove(B)

print(ans[0])

Solution (Python):
a = int(input())
b = int(input())

if a + b == 3:
    print(3)
elif a + b == 4:
    print(2)
else:
    print(1)

Solution (Python):
a = int(input())
b = int(input())

if a == 1 and b ==2:
  print(3)
if a == 2 and b ==1:
  print(3)
if a == 1 and b ==3:
  print(2)
if a == 3 and b ==1:
  print(2)
if a == 2 and b ==3:
  print(1)
if a == 3 and b ==2:
  print(1)

Solution (Python):

import sys
import math
import collections


a=int(input())
b=int(input())


print(6-a-b)

Solution (Python):
A = int(input())
B = int(input())

answers = [1, 2, 3]

answers.remove(A)
answers.remove(B)
print(answers[0])

Solution (Python):
A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):
total = 6
A = int(input())
B = int(input())
answer = total - A - B
print(answer)

Solution (Python):


a = int(input())
b = int(input())
list = [1, 2, 3]

list.remove(a)
list.remove(b)
print(list[0])

Solution (Python):
a = int(input())
b = int(input())
s = {1,2,3}
s.remove(a)
s.remove(b)
for x in s:
    print(x)

Solution (Python):
a=int(input())
b=int(input())
print(6-a-b)

Solution (Python):
A = int(input())
B = int(input())
if(A==1 and B==2):
  ans=3
if(A==1 and B==3):
  ans=2
if(A==2 and B==1):
  ans=3
if(A==2 and B==3):
  ans=1
if(A==3 and B==1):
  ans=2
if(A==3 and B==2):
  ans=1
print(ans)

Solution (Python):
result = [1, 2, 3]

A = int(input())
B = int(input())

result.remove(A)
result.remove(B)

print(result[0])

Solution (Python):
a = int(input())
b = int(input())
ans = 6-(a+b)
print(ans)

Solution (Python):
a = int(input())
b = int(input())

l = [1,2,3]

l.remove(a)
l.remove(b)

print(l[0])

Solution (Python):
a = int(input())
b = int(input())
l = [1,2,3]

l.remove(a)
l.remove(b)

print(l[0])

Solution (Python):
li = [1,2,3]
for i in range(2):
    li.remove(int(input()))
print(*li)

Solution (Python):
A = int(input())
B = int(input())

choice = set([1, 2, 3])

choice.remove(A)
choice.remove(B)

ans = choice.pop()
print(ans)

Solution (Python):
A = int(input())
B = int(input())
if A != 1 and B != 1:
        print(1)
elif A != 2 and B != 2:
        print(2)
elif A != 3 and B != 3:
        print(3)

Solution (Python):



A = int(input())
B = int(input())

print([i for i in [1, 2, 3] if (i != A and i != B)][0])

Solution (Python):
A = int(input())
B = int(input())
n = [1, 2, 3]
n.remove(A)
n.remove(B)
print(n[0])

Solution (Python):
a=int(input())
b=int(input())

print(6-a-b)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

a, b = map(int, read().split())
ans = [1, 2, 3]
tmp = [a, b]
ans = set(ans) - set(tmp)

print(list(ans)[0])

Solution (Python):
a = int(input())
b = int(input())
if a+b == 3:
  print(3)
elif a+b == 5:
  print(1)
else:
  print(2)

Solution (Python):
A = int(input())
B = int(input())
print(6 - A - B)

Solution (Python):
ans = [1, 2, 3]
A = int(input())
B = int(input())
ans.remove(A)
ans.remove(B)
print(ans[0])

Solution (Python):
a=int(input())
b=int(input())

abc_list = [a,b]

if not(1 in abc_list):
    print(1)
if not(2 in abc_list):
    print(2)
if not(3 in abc_list):
    print(3)

Solution (Python):
A = input()
B = input()

ch = {'1', '2', '3'}

ch.remove(A)
ch.remove(B)
print(ch.pop())

Solution (Python):
a=int(input())
b=int(input())
if a==1:
  if b==2:
    print(3)
  elif b==3:
    print(2)
elif a==2:
  if b==1:
    print(3)
  elif b==3:
    print(1)
else:
  if b==1:
    print(2)
  elif b==2:
    print(1)

Solution (Python):
A = int(input())
B = int(input())
print([i for i in range(1,4) if i not in [A,B]][0])

Solution (Python):
import sys


def main():
    
    a = int(input())
    b = int(input())

    candidates = [1, 2, 3]
    candidates.remove(a)
    candidates.remove(b)

    print(candidates[0])


if __name__ == '__main__':
    main()

Solution (Python):
C = [1 for _ in range(3)]
C[int(input())-1] = 0
C[int(input())-1] = 0

for i in range(3):
    if C[i] == 1:
        print(i+1)

Solution (Python):
A=int(input())
B=int(input())
print(6-A-B)

Solution (Python):
a = int(input())
b = int(input())

for i in range(1, 4):
    if i == a or i == b:
        continue
    else:
        print(i)

Solution (Python):
a=int(input())
b=int(input())
ans=0

if a+b==3:
	ans=3
elif a+b==4:
	ans=2
else:
	ans=1
	
print(ans)

Solution (Python):
inp1 = int(input())
inp2 = int(input())

if(inp1 != 1 and inp2 != 1):
  	print(str(1))

if(inp1 != 2 and inp2 != 2):
  	print(str(2))

if(inp1 != 3 and inp2 != 3):
	print(str(3))

Solution (Python):
A = int(input())
B = int(input())

ans = [1, 2, 3]
ans.remove(A)
ans.remove(B)

print(ans[0])

Solution (Python):

A = int(input())
B = int(input())

ans_list = [1, 2, 3]
ans_list.remove(A)
ans_list.remove(B)
print(ans_list[0])

Solution (Python):
A = int(input())
B = int(input())

X = [1, 2, 3]

X.remove(A)
X.remove(B)

print(X[0])

Solution (Python):
a = int(input())
b = int(input())

print(6 - a - b)

Solution (Python):
a = int(input())
b = int(input())

if a != 1 and b != 1:
  print(1)
elif a != 2 and b != 2:
  print(2)
elif a != 3 and b != 3:
  print(3)

Solution (Python):

A=int(input())
B=int(input())
if A+B==3:
    print(3)
elif A+B==4:
    print(2)
else:
    print(1)

Solution (Python):
a=int(input())
b=int(input())

if a*b==2:
  print(3)
elif a*b==3:
  print(2)
else:
  print(1)

Solution (Python):
A = int(input())
B = int(input())

an = A + B

print(6-an)

Solution (Python):
*L,  = [list(map(int, s.split())) for s in open(0)]
A, B = L[0][0], L[1][0]
ans = [1, 2, 3]
ans.remove(A)
ans.remove(B)
print(ans[0])

Solution (Python):
a = int(input())
b = int(input())
print(6-a-b)

Solution (Python):
A = int(input())
B = int(input())
l = [1,2,3]
l.remove(A)
l.remove(B)
print(l[0])

Solution (Python):
X = [input() for i in range(2)]
X = set(X)
X
ans = set(['1', '2', '3'])-X
ans = list(ans)
print(ans[0])

Solution (Python):
A = int(input())
B = int(input())

ans = 6 - A - B
print(ans)

Solution (Python):
a = int(input())
b = int(input())
t = set([1,2,3])

s = set([a,b])
res = t-s
print(list(res)[0])

Solution (Python):
A = int(input())
B = int(input())

if A == 1 and B == 2:
       print(3) 

if A == 1 and B == 3:
       print(2) 

if A == 2 and B == 1:
       print(3) 

if A == 2 and B == 3:
       print(1)

if A == 3 and B == 1:
       print(2)

if A == 3 and B == 2:
       print(1)

Solution (Python):
A = int(input())
B = int(input())

Q = [1,2,3]

Q.remove(A)
Q.remove(B)
print(Q[0])

Solution (Python):
A = int(input())
B = int(input())
option = [1,2,3]

option.remove(A)
option.remove(B)
print(option[0])

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A = inputInt()
	B = inputInt()

	lst = [1,2,3]

	lst.remove(A)
	lst.remove(B)

	print(lst[0])


if __name__ == "__main__":
	main()

Solution (Python):
str = [int(input()) for i in range(2)]
input_sum = sum(str)
ans = 6 - input_sum
print(ans)

Solution (Python):


A = int(input())
B = int(input())

results = [1, 2, 3]

results.remove(A)
results.remove(B)

print(results[0])

Solution (Python):
a = int(input())
b = int(input())

sum = a + b

if sum == 5:
  print(1)
elif sum == 4:
  print(2)
elif sum == 3:
  print(3)

Solution (Python):
A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):
ans = [1,2,3]
a = int(input())
b = int(input())
ans.remove(a)
ans.remove(b)
print(str(ans[0]))

Solution (Python):
a=int(input())
b=int(input())
if max(a,b)==3 and min(a,b)==2:
    print(1)
elif max(a,b)==2 and min(a,b)==1:
    print(3)
else:
    print(2)

Solution (Python):
A = int(input())
B = int(input())

if   (A == 1 and B == 2) or (B == 1 and A == 2):
    print(3)
elif (A == 2 and B == 3) or (B == 2 and A == 3):
    print(1)
elif (A == 1 and B == 3) or (B == 1 and A == 3):
    print(2)

Solution (Python):
from sys import stdin
f_i = stdin


answers = [1, 2, 3]
A = int(f_i.readline())
B = int(f_i.readline())

answers.remove(A)
answers.remove(B)

print(answers[0])

Solution (Python):
a = int(input())
b = int(input())
if (a == 1 or a == 2) and (b == 2 or b == 1):
    print(3)
elif (a == 1 or a == 3) and (b == 1 or b == 3):
    print(2)
else:
    print(1)

Solution (Python):
a = int(input())
b = int(input())
print(int(6/(a*b)))

Solution (Python):
a = int(input())
b = int(input())
candidates = [False for _ in range(3)]
candidates[a - 1] = True
candidates[b - 1] = True
for i, candidate in enumerate(candidates):
    if not candidate:
        print(i + 1)
        break

Solution (Python):
x = int(input())
y = int(input())
print(6-x-y)

Solution (Python):
A = int(input())
B = int(input())
a = [1,2,3]
for i in range(len(a)):
  if a[i] != A and a[i] != B:
    print(a[i])

Solution (Python):
ans = [1,2,3]
ans.remove(int(input()))
ans.remove(int(input()))
print(ans[0])

Solution (Python):
A=int(input())
B=int(input())
ans=[1,2,3]
if A>B:
    ans.pop(A-1)
    ans.pop(B-1)
else:
    ans.pop(B-1)
    ans.pop(A-1)

print(ans[0])

Solution (Python):
a = int(input())
b = int(input())

answer = [1, 2, 3]

answer.pop(answer.index(a))
answer.pop(answer.index(b))

print(answer[0])

Solution (Python):
a = int(input())
b = int(input())
print(6-a-b)

Solution (Python):
A = int(input())
B = int(input())

if A==1 and B==2:
    print(3)
elif A==1 and B == 3:
    print(2)
elif A == 2 and B == 1:
    print(3)
elif A ==2 and B ==3:
    print(1)
elif A == 3 and B == 1:
    print(2)
else:
    print(1)

Solution (Python):
a=int(input())
b=int(input())
l=[1,2,3]
l.remove(a)
l.remove(b)
ans=l[0]
print(ans)

Solution (Python):
a = int(input())
b = int(input())

ans = [1, 2, 3]

if a in ans:
  ans.remove(a)
  if b in ans:
    ans.remove(b)
    
print(ans[0])

Solution (Python):



def main():
    ans = [1,2,3]
    a = int(input())
    b = int(input())
    ans.remove(a)
    ans.remove(b)
    print(ans[0])


if __name__ == '__main__':
    main()

Solution (Python):
a = input()
b = input()

s = a+b

if "1" not in s:
    print(1)
elif "2" not in s:
    print(2)
else:
    print(3)

Solution (Python):
a = int(input())
b = int(input())

ans = set([1,2,3])
ans.remove(a)
ans.remove(b)
for i in ans:
    print(i)

Solution (Python):
A = int(input())
B = int(input())
if (A == 1 and B == 2):
    print(3)
elif (A == 1 and B == 3):
    print(2)
elif (A == 2 and B == 1):
    print(3)
elif (A == 2 and B == 3):
    print(1)
elif (A == 3 and B == 1):
    print(2)
elif (A == 3 and B == 2):
    print(1)

Solution (Python):
A = int(input())
B = int(input())

Ans = [1,2,3]
Ans.remove(A)
Ans.remove(B)

print(Ans.pop())

Solution (Python):
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a = inn()
b = inn()
if a in [1,2] and b in [1,2]:
    print(3)
    exit()
if a in [1,3] and b in [1,3]:
    print(2)
    exit()
print(1)

Solution (Python):
A = int(input())
B = int(input())

l = [1, 2, 3]

l.remove(A)
l.remove(B)
print(l[0])

Solution (Python):
from sys import stdin 
a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())

if a + b == 3:
    print(3)
elif a + b == 4:
    print(2)
else:
    print(1)

Solution (Python):

import sys


def solve(A: int, B: int):
    if (A == 1 and B == 2) or (A == 2 and B == 1):
        print(3)
    elif (A == 1 and B == 3) or (A == 3 and B == 1):
        print(2)
    else:
        print(1)


    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input  = sys.stdin.readline


def solve():
    A = int(input())
    B = int(input())
    ans = [1,2,3]
    ans[A-1]=0
    ans[B-1]=0
    print(max(ans))


if __name__ == '__main__':
    solve()

Solution (Python):
a = int(input())
b = int(input())
c = a + b
if c == 3:
    print(3)
if c == 4:
    print(2)
if c == 5:
    print(1)

Solution (Python):
import numpy as np

A=int(input())
B=int(input())
X=A+B
if X==3:
	print(3)
elif X==4:
	print(2)
elif X==5:
	print(1)

Solution (Python):
a = str(input())
b = str(input())
c = ["1","2","3"]
c.remove(a)
c.remove(b)
print(''.join(c))

Solution (Python):
A = int(input())
B = int(input())

print(6-(A+B))

Solution (Python):
a=int(input())
b=int(input())

ans=[a,b]
for i in range(1,4):
  if i not in ans:
    print(i)

Solution (Python):
l = [1,2,3]
a = int(input())
b = int(input())
l.remove(a)
l.remove(b)
print(l[0])

Solution (Python):
A = int(input())
B=int(input())
list123 = [1,2,3]
for i in range(3):
    if list123[i] != A and list123[i] != B:
        print(list123[i])

Solution (Python):
A = int(input())
B = int(input())

ans = 6 - A - B

print(ans)

Solution (Python):
A = int(input())
B = int(input())

print(6-A-B)

Solution (Python):

A = int(input())
B = int(input())

if A == 2 and B == 1:
    print(3)
elif B == 2 and A == 1:
    print(3)
elif A == 3 and B == 1:
    print(2)
elif B == 3 and A == 1:
    print(2)
elif A == 2 and B == 3:
    print(1)
else:
    print(1)

Solution (Python):
a = int(input())
b = int(input())
ans = [1, 2, 3]
ans.remove(a)
ans.remove(b)
print(ans[0])

Solution (Python):
number = [1,2,3]

number.remove(int(input()))
number.remove(int(input()))
print(number[0])

Solution (Python):
a = int(input())
b = int(input())
lis = [1,2,3]
lis.remove(a)
lis.remove(b)
print(lis[0])

Solution (Python):
a = int(input())
b = int(input())
l = [1, 2, 3]
l.remove(a)
l.remove(b)
print(l[0])

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A = inputInt()
	B = inputInt()

	lst = [1,2,3]

	lst.remove(A)
	lst.remove(B)

	print(lst[0])


if __name__ == "__main__":
	main()

Solution (Python):
a = int(input())
b = int(input())

nums = [1,2,3]

del nums[nums.index(a)]
del nums[nums.index(b)]

print(nums[0])

Solution (Python):
a=int(input())
b=int(input())

if (a==1 and b==2) or  (a==2 and b==1):
    print(3)
elif a==2 and b==3 or (a==3 and b==2):
    print(1)
else:
    print(2)

Solution (Python):
print(6 - int(input())-int(input()))

Solution (Python):
a = int(input())
b = int(input())
li = [1, 2, 3]
li.remove(a)
li.remove(b)
print(li[0])

Solution (Python):
a = int(input())
b = int(input())
l = [a,b]

for i in range(1,4):
    if i not in l:
        print(i)

Solution (Python):

A=int(input())
B=int(input())

if (A==1) and (B==2):
    print(3)
elif (A==1) and (B==3):
    print(2)
elif (A==2) and (B==1):
    print(3)
elif (A==2) and (B==3):
    print(1)
elif (A==3) and (B==1):
    print(2)
elif (A==3) and (B==2):
    print(1)

Solution (Python):
a=int(input())
b=int(input())

print(6-a-b)

Solution (Python):
a=[]
a.append(int(input()))
a.append(int(input()))
if not 1 in a:
    print(1)
if not 2 in a:
    print(2)
if not 3 in a:
    print(3)

Solution (Python):
A = int(input())
B = int(input())

data = [1,2,3]
data.remove(A)
data.remove(B)
print(data[0])

Solution (Python):
a = int(input())
b = int(input())
ans = 0

for i in range(1,4):
    if a != i and b != i:
        ans = i
        break
        
print(ans)

Solution (Python):
A = int(input())
B = int(input())

mylist = [1,2,3]

for i in mylist:
    if i != A and i != B:
        print(i)

Solution (Python):
a = int(input())
b = int(input())
Lis = [a, b]
for i in range(1, 4):
  if i not in Lis:
    print(i)
    break

Solution (Python):
Num1 = int(input())
Num2 = int(input())

NumSt = [0,0,0]

NumSt[Num1-1] = 1
NumSt[Num2-1] = 1

for i in range(3):
  if NumSt[i] == 0:
    print(i + 1)

Solution (Python):
a = int(input())
b = int(input())
print(6-a-b)

Solution (Python):
ans=[1,2,3]
a=int(input())
b=int(input())

ans.remove(a)
ans.remove(b)

print(ans[0])

Solution (Python):
a = int(input())
b = int(input())
if a == 1 and b == 2:
  print('3')
  
elif a == 2 and b == 3:
  print('1')
elif a == 1 and b == 3:
  print('2')
elif a == 2 and b == 1:
  print('3')
elif a == 3 and b == 1:
  print('2')
else:
  print('1')

Solution (Python):
A = int(input())
B = int(input())

if A == 1 and B == 2:
  print(3)
if A == 2 and B == 1:
  print(3)
if A == 1 and B == 3:
  print(2)
if A == 3 and B == 1:
  print(2)
if A == 2 and B == 3:
  print(1)
if A == 3 and B == 2:
  print(1)

Solution (Python):
a = int(input())
b = int(input())
print(6-a-b)

Solution (Python):
a=int(input())
b=int(input())
print(6-a-b)

Solution (Python):
num = [1,2,3]

num.remove(int(input()))
num.remove(int(input()))

print(num[0])

Solution (Python):
import sys; readline = sys.stdin.readline
from collections import deque

A = int(readline())
B = int(readline())

ans = list(set([1,2,3]) - set([A, B]))
print(ans[0])

Solution (Python):
a = int(input())
b = int(input())

print("{}".format(6-a-b))

Solution (Python):
A=int(input())
B=int(input())
print(6-A-B)

Solution (Python):
a=int(input())
b=int(input())
print(6-(a+b))

Solution (Python):
a = int(input())
b = int(input())

print(*({1, 2, 3} - {a, b}))

Solution (Python):
def main():
    a = int(input())
    b = int(input())

    print(6 - (a + b))


if __name__ == "__main__":
    main()

Solution (Python):


a=int(input())
b=int(input())
ans=[1,2,3]
ans.remove(a)
ans.remove(b)
print(*ans)

Solution (Python):
a, b = input(), input()
s = list("123")
s.pop(s.index(a))
s.pop(s.index(b))
print(s[0])

Solution (Python):
if __name__ == "__main__":
	A = int(input())
	B = int(input())
	l = []
	l.append(A)
	l.append(B)
	if 1 in l:
		if 2 in l:
			print("3")
		elif 3 in l:
			print("2")
	else:
		print("1")

Solution (Python):
A = int(input())
B = int(input())

print(6-A-B)

Solution (Python):
a = int(input())
b = int(input())
if a != 1 and b != 1:
    print(1)
elif a != 2 and b != 2:
    print(2)
else:
    print(3)

Solution (Python):
A = int(input())
B = int(input())
l = [1, 2, 3]
for i in range(3):
  if (l[i] != A) and (l[i] != B):
    print(l[i])

Solution (Python):
a = int(input())
b = int(input())
if a*b == 2:
  print(3)
elif a*b == 3:
  print(2)
else:
  print(1)

Solution (Python):
a=int(input())
b=int(input())
numbers=[]
numbers.append(a)
numbers.append(b)
for i in range(1,4):
  if i not in numbers:
    print(i)

Solution (Python):
st = {1, 2, 3}
st.remove(int(input()))
st.remove(int(input()))
print(list(st)[0])

Solution (Python):
A = int(input())
B = int(input())

l = [1, 2, 3]
l.remove(A)
l.remove(B)
print(l[0])

Solution (Python):
a = int(input())
b = int(input())

ab = [a, b]

if 1 not in ab:
  print(1)
elif 2 not in ab:
  print(2)
else:
  print(3)

Solution (Python):
a = input()
b = input()

ans = int('123'.replace(a, '').replace(b, ''))

print(ans)

Solution (Python):
a = int(input())
b = int(input())
answer = [1,2,3]
answer.remove(a)
answer.remove(b)
print(answer[0])

Solution (Python):
list_ = [1,2,3]
a = int(input())
b = int(input())
list_.pop(list_.index(a))
list_.pop(list_.index(b))
print(list_[0])

Solution (Python):
A = int(input())
B = int(input())

for i in range(1,4):
    if (i != A) and (i !=B):
        print(i)

Solution (Python):




ll= lambda : list(map(int,input().split()))
testcases=1

for testcase in range(testcases):
	[a]=ll()
	[b] = ll()
	x =[1,2,3]
	for i in x:
		if(i!=a and i!=b):
			print(i)

Solution (Python):
a=int(input())
b=int(input())
print(6-a-b)

Solution (Python):
a = input()
b = input()
if a == "1":
    if b == "2":
        print(3)
    elif b == "3":
        print(2)
if a == "2":
    if b == "1":
        print(3)
    elif b == "3":
        print(1)
if a == "3":
    if b == "1":
        print(2)
    elif b == "2":
        print(1)

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	a = int(input())
	b = int(input())
	if(set([a,b])==set([1,2])):
		print(3)
	elif(set([a,b])==set([1,3])):
		print(2)
	else:
		print(1)

def factorization(n):
	if n<2:
		return []
	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(numbers):
	return reduce(fractions.gcd, numbers)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

Solution (Python):


a = int(input())
b = int(input())
print(6-a-b)

Solution (Python):
a = int(input())
b = int(input())

answer = {1,2,3} - {a, b}

print(list(answer)[0])

Solution (Python):
a = input()
b = input()

list = ['1','2','3']
list.remove(a)
list.remove(b)

print(list[0])

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


a = INT()
b = INT()
l = [1, 2, 3]

l.remove(a)
l.remove(b)

print(l[0])

Solution (Python):
a = int(input())
b = int(input())
ls = []
ls.append(a)
ls.append(b)
if 1 not in ls:
  print(1)
elif 2 not in ls:
  print(2)
else:
  print(3)

Solution (Python):
def solve():
    A = int(input())
    B = int(input())
    for i in range(1, 4):
        if i != A and i != B:
            print(i)


if __name__ == '__main__':
    solve()

Solution (Python):
a = int(input())
b = int(input())
for i in range(1, 4):
  if i!=a and i!=b:
    print(i)
    break

Solution (Python):

import math
import datetime
import itertools
import sys
import copy





A = int(input())
B = int(input())

print (6-A-B)