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==2 and B==3) or (A==3 and B==2):
  print(1)
elif (A==1 and B==3) or (A==3 and B==1):
  print(2)
else:
  print(3)

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

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

n = [1,2,3]

n.remove(A)
n.remove(B)

print(n[0])

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

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

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

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

print(6 - A - B)

Solution (Python):
a=int(input())
b=int(input())
t=[1,2,3]
for i in t:
  if i != a and i != b:
    print(i)

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

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

if A + B == 3:
  print("3")
  
if A + B == 4:
  print("2")
  
if A + B == 5:
  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):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))



c = []
a = I()
b = I()
c.append(a)
c.append(b)
if 1 in c and 2 in c:
    print(3)
    exit()
if 1 in c and 3 in c:
    print(2)
else:
    print(1)

Solution (Python):
A = int(input())
B = int(input())
for i in [1, 2, 3]:
    if i not in [A, B]:
        print(i)
        break

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

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

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

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

output = 6 - A - B

print(output)

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

s = set()
s.add(a)
s.add(b)

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

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

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

for i in range(1,4):
    if A!=i and B!=i:
        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]

for i in ans:
        if i == A:
                continue
        elif i == B:
                continue
        else:
                print(i)

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

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

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

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())
print(6-(a+b))

Solution (Python):

a = input()
b = input()

all_set = {"1", "2", "3"}

all_set.remove(a)
all_set.remove(b)

for i in all_set:
    print(i)

Solution (Python):
A = input()
B = input()
print list(set([1, 2, 3]) - set([A, B]))[0]

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

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

Solution (Python):
def main():
    A = int(input())
    B = int(input())
    for x in [1, 2, 3]:
        if x != A and x != B:
            print(x)
            break


if __name__ == "__main__":
    main()

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

tmp = [1,2,3]

for t in tmp:
  if t != a and t!=b:
    print(t)

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

Solution (Python):
x = [int(input()) for _ in range(2)]
if 1 not in x:
    ans = 1
elif 2 not in x:
    ans = 2
else:
    ans = 3
print(ans)

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

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

	print(int(l[0]))

	




if __name__ == '__main__':
	main()

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

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)
elif (A==2 and B==3) or (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())
c=[1,2,3]
c.remove(a)
c.remove(b)
print(c[0])

Solution (Python):


def main():
    gotou = [int(input()) for i in range(2)]
    if 1 not in gotou:
        print(1)
    elif 2 not in gotou:
        print(2)
    else:
        print(3)

if __name__ == "__main__":
    main()

Solution (Python):

ab = int(input()) + int(input())

print(6-ab)

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 = [False] * 3

ans[a-1] = True
ans[b-1] = True

for i in range(3):
  if not ans[i]:
    print(i+1)

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())
if a + b == 4:
    print(2)
elif a+b == 5:
    print(1)
elif a+b == 3:
    print(3)

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

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

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

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

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

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

C = "123"

C = C.replace(A, "")
C = C.replace(B, "")

print(C)

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

outs= [1, 2, 3]
outs.remove(a)
outs.remove(b)
print(outs[0])

Solution (Python):
a = int(input())
b = int(input())
ls = [1,2,3]
ls.remove(a)
ls.remove(b)
for i in ls:
    print(i)

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):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    a=int(input())
    b = int(input())
    print(6-a-b)
main()

Solution (Python):

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

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

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

Solution (Python):


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

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

Solution (Python):
x1 = [int(input()) for i in range(2)]

for i in range (1,4):
    if i not in x1:
        print (i)
        exit(0)

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

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

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

lst = [1, 2, 3]

for _ in lst:
    if _ == a or _ == b:
        pass
    else:
        print(_)

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

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

ab  = [A, B]
all = [1,2,3]

for i in all:
  if i in ab:
    continue
  else:
    print(i)
    break

Solution (Python):
A = input()
B = input()
a = [ "1", "2", "3" ]
a.remove(A)
a.remove(B)
print(a[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)
elif((A==1 and B==3) or (A==3 and B==1)):
	print(2)

Solution (Python):
A = int(input())
B = int(input())
X = [0] * 4
X[A] = 1
X[B] = 1

for i in range(1, 4):
  if X[i] == 0:
    print(i)
    exit()

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())

x = []
x.append(a)
x.append(b)

if 1 not in (x):
    print("1")
if 2 not in (x):
    print("2")
if 3 not in (x):
    print("3")

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

Solution (Python):

def main():
    A = int(input())
    B = int(input())
    now = set([1,2,3])
    now.discard(A)
    now.discard(B)
    print(now.pop())

if __name__ == "__main__":
    main()

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

li = LIST(2)
if 1 not in li:
    print(1)
elif 2 not in li:
    print(2)
else:
    print(3)

Solution (Python):
a = int(input())
b = int(input())
ans = [0]*3
ans[a-1]+=1
ans[b-1]+=1
for i in range(3):
    if ans[i]==0:
        print(i+1)

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

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())
print(6-a-b)

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

anss = [1,2,3]

anss.remove(int(A))
anss.remove(int(B))
print(anss[0])

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

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

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

L = 6

ans = L - (A + B)
print(ans)

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):

def solve():
    return ({'1', '2', '3'}-{input(),input()}).pop()

if __name__ == '__main__':
    print(solve())

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

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

anss = [1, 2, 3]
dans = [a, b]
ans = 0
for i in anss:
  if i in dans:
    continue
  ans = i
print(ans)

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

ans = "123"
ans = ans.replace(A, "").replace(B, "")

print(ans)

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

Solution (Python):

f = int(input())
s = int(input())

print(6 - f - s)

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

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

Solution (Python):



def solve(*args: str) -> str:
    ans = set(['1', '2', '3'])
    return (ans - set(args)).pop()


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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==2 and B==3:
    print(1)
if A==3 and B==2:
    print(1)
if A==1 and B==3:
    print(2)
if A==3 and B==1:
    print(2)

Solution (Python):
def run():
  A = int(input())
  B = int(input())
  for C in range(1, 4):
    if C == A: continue
    elif C == B: continue
    else:
      print(C)
  
if __name__ == '__main__':
  run()

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a = I()
b = I()

if (a == 1 and b == 2) or (a == 2 and b == 1):
    print(3)
elif (a == 3 and b == 1) or (a == 1 and b == 3):
    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())

a = [A, B]

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

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())

l = {1, 2, 3}
l -= {A}
l -= {B}

print(*l)

Solution (Python):
a = int(input())
b = int(input())
x = [0,0,0]
x[a-1] = 1
x[b-1] = 1
for i in range(3):
  if x[i] == 0:
    print(i+1)

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

ans = 6 - A - B
print(ans)

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

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

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

a, b = int(input()), int(input())
print((set([1,2,3]) - set([a,b])).pop())

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

s = set([1,2,3])
s.remove(A)
s.remove(B)
print(s.pop())

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

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

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)
for i in (1, 2, 3):
    if i not in ab:
        print(i)
        break

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())
print(6-a-b)

Solution (Python):
s = [input() for _ in range(2)]

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())

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

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

s = set()
s.add(A)
s.add(B)

sa = {1, 2, 3}

print(*(sa - s))

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):
import sys
input = sys.stdin.readline

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

print(6-a-b)

Solution (Python):
x=int(input())
y=int(input())

if x==1 and y==2:
  print(3)
elif x==1 and y==3:
  print(2)
elif x==2 and y==1:
  print(3)
elif x==2 and y==3:
  print(1)
elif x==3 and y==1:
  print(2)
elif x==3 and y==2:
  print(1)

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

s = 6 - a - b
print(s)

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())

l=[1,2,3]

l.pop(l.index(a))
l.pop(l.index(b))

for i in l:
    print(i)

Solution (Python):
INF = float("inf") 
MOD = 10**9+7 
MAX = 510000 

def main():
    a = [int(input()) for i in range(2)]
    if 1 not in a:
        print(1)
    elif 2 not in a:
        print(2)
    elif 3 not in a:
        print(3)


if __name__ == "__main__":
    main()

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):
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())

ans = []
ans.append(a)
ans.append(b)

if 1 in ans and 2 in ans:
    print(3)
elif 2 in ans and 3 in ans:
    print(1)
elif 1 in ans and 3 in ans:
    print(2)

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

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

print(ans[0])

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

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

ls = [1,2,3]

ls.remove(a)
ls.remove(b)

c = ls[0]

print(c)

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())
li=[1,2,3]
for i in li:
  if i not in [a,b]:
    print(i)

Solution (Python):
import math


def inputIntList():
    return [int(s) for s in input().split()]


def inputInt():
    return int(input())


def main():
    ans = [1, 2, 3]
    ans.remove(inputInt())
    ans.remove(inputInt())

    return ans[0]


if __name__ == "__main__":
    print(main())

Solution (Python):
a = int(input())
b = int(input())
li = [1,2,3]
for i in li:
    if i != a and i != b:
        print(i)

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

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

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

Solution (Python):
def read():
    A = int(input().strip())
    B = int(input().strip())
    return A, B

def solve(A, B):
    answers = set([1, 2, 3])
    answers.remove(A)
    answers.remove(B)
    return answers.pop()


if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))

Solution (Python):

l = "123"
for i in range(2):
    l = l.replace(input(),"")
print(l)

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

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

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

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

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

for i in [1, 2, 3]:
    if i in {A, B}:
        continue
    print(i)

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())

C = 6 - (A + B)

print(C)

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):
"""
Atcoder_Beginner_Contest_148
A
"""
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10000)

ans = [1,2,3]
A = int(input())
B = int(input())
result = set(ans) - set([A,B])

print(result.pop())

Solution (Python):
a = int(input())
b = int(input())
for i in (1,2,3):
    if i not in (a, b):
        print(i)

Solution (Python):
import sys

A = int(input())
B = int(input())
List = [1, 2, 3]

for i in range(1, 4):
    if i == A:
        continue
    elif i == B:
        continue
    else:
        print(i)
        sys.exit(0)

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

print(6-A-B)

Solution (Python):

a = [1,2,3]
a.remove(int(input()))
a.remove(int(input()))
print(a[0])

Solution (Python):
ans = [True] * 3
ans[int(input()) - 1] = False
ans[int(input()) - 1] = False
print(ans.index(True) + 1)

Solution (Python):
def examA():
    AB = [I() for _ in range(2)]
    for i in range(1,4):
        if not i in AB:
            ans = i
            break
    print(ans)
    return

def examB():
    return

def examC():
    return

def examD():
    return

def examE():
    return

def examF():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

Solution (Python):
N=int(input())
S=int(input())

list=[1,2,3]

list.remove(N)
list.remove(S)

print(list[0])

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

li = [0,1,2,3]
li[a] = 0
li[b] = 0

ans = max(li)
print(ans)

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

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

print(ans[0])

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

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

print(6-a-b)

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

arr = [1,2,3]
arr.remove(a)
arr.remove(b)
print(arr[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):
n1 = int(input())
n2 = int(input())


print(6-n1-n2)

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

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

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

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

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())

print(*(set([1, 2, 3])  -set([A, B])))

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

Solution (Python):
a = int(input())
b = int(input())
x = min(a, b)
y = max(a, b)
if x == 1:
    if y == 2:
        print(3)
    else:
        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==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):
from sys import stdin

n = int(stdin.readline().rstrip())
m = int(stdin.readline().rstrip())
li = [1,2,3]

li.remove(n)
li.remove(m)
print(li[0])

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

print(6-a-b)

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

C = [1,2,3]

C.remove(A)
C.remove(B)

print(int(C[0]))

Solution (Python):
n = {1, 2, 3}
for _ in range(2):
    n.remove(int(input()))
print(list(n)[0])

Solution (Python):

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

if a in (1, 2) and b in (1, 2):
    print(3)
elif a in (1, 3) and b in (1, 3):
    print(2)
else:
    print(1)

Solution (Python):
a = int(input())
b = int(input())
ans = set([1,2,3])
w = set([a,b])
ans = list(ans - w)
print("{}".format(ans[0]))

Solution (Python):
import sys
def I(): return int(sys.stdin.readline())
def LI(): return [int(x) for x in sys.stdin.readline().split()]

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

if __name__ == "__main__":
    main()

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

for i in [1, 2, 3]:
    if i not in [A, B]:
        print(i)

Solution (Python):
a = int(input())
b = int(input())
list = [a, b]
if 1 in list and 2 in list:
    print(3)
elif 1 in list and 3 in list:
    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 1 not in [a, b]:
  print(1)
elif 2 not in [a, b]:
  print(2)
else:
  print(3)

Solution (Python):



 
import sys
import math



 

fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile


mod=1000000007
 

def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 

for tt in range(1):
    a=int(input())
    b=int(input())
    if a*b==6:
        print(1)
    elif a*b==3:
        print(2)
    else:
        print(3)
    
    
    
    

if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

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

list = [1, 2, 3]

list.remove(A)
list.remove(B)

print(list[0])

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

rslt = ans.pop()
print(rslt)

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!=1):
  print(1)
elif (A!=2) and (B!=2):
  print(2)
else:
  print(3)

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

a = int(input())
b = int(input())
candidate.remove(a)
candidate.remove(b)
print(candidate.pop())

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

Solution (Python):
def main():
    a = int(input())
    b = int(input())
    if a+b == 3:
        print(3)
    elif a+b == 4:
        print(2)
    elif a+b == 5:
        print(1)
    
if __name__ == '__main__':
    main()

Solution (Python):
a={1,2,3}-{int(input()),int(input())}
print(list(a)[0])

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

print(*ans)

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 == 6:
  print(1)
elif a*b == 3:
  print(2)

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

answer=[1,2,3]

answer.remove(A)
answer.remove(B)

print(answer[0])

Solution (Python):
a = int(input())
b = int(input())
t1 = {a, b}
t = {1, 2, 3}
for i in t-t1:
    print(i)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
a=int(input())
b=int(input())
if 1!=a and 1!=b:
    print(1)
elif 2!=a and 2!=b:
    print(2)
else:
    print(3)

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

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

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:
    if b == 2:
        print(3)
    elif b == 3:
        print(2)
elif a == 2:
    if b == 1:
        print(3)
    elif b == 3:
        print(1)
elif a == 3:
    if b == 1:
        print(2)
    elif b == 2:
        print(1)

Solution (Python):
A = int(input())
B = int(input())
if A in [1, 2] and B in [1, 2]:
    print(3)
elif A in [1, 3] and B in [1, 3]:
    print(2)
else:
    print(1)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a = ri()
    b = ri()
    num = [True for _ in range(4)]
    num[a] = False
    num[b] = False
    for i in range(1, 4):
        if num[i]:
            print(i)

if __name__ == '__main__':
    main()

Solution (Python):


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

for i in [1,2,3]:
    if i == A or i == B:
        continue
    else:
        print(i)

Solution (Python):
def main():
    A = [int(input()) for _ in range(2)]
    num = [1,2,3]
    for n in num:
        if not n in A:
            print(n)
            exit()



if __name__ == "__main__":
    main()

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

sol = 6 - (A+B)

print(sol)

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

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

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

Solution (Python):
A=input()
B=input()
for x in range(1,4):
    if x==A: continue
    elif x==B: continue
    print x

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

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())
alist = [1, 2, 3]

for i in alist:
    if A == i or B == i:
        continue
    else:
        print(i)

Solution (Python):
def main():
    A = int(input())
    B = int(input())
    for i in range(3):
        if i + 1 == A or i + 1 == B:
            continue
        else:
            print(i+1)


if __name__ == "__main__":
    main()

Solution (Python):
A = int(input())
B = int(input())
T = set([A,B])

for e in (set([1,2,3])-T):
    print(e)

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

print(6 - A - B)

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

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

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

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

for i in [1, 2, 3]:
    if i != a and i != b:
        print(i)

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

Solution (Python):
n = int(input())
m = int(input())
print((5 - n -m)%3 + 1)

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

print(6- A -B)