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())
print(6-A-B)

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())
print(6-A-B)

Solution (Python):
from sys import exit, stdin
A = int(stdin.readline().rstrip())
B = int(stdin.readline().rstrip())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)
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 = int(input())
b = int(input())
c = [1,2,3]
c.remove(a)
c.remove(b)

print(c[0])

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

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

print(6-a-b)

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


print(list(set(range(1, 4)).difference(set([a, b])))[0])

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

Solution (Python):
A = [1,2,3]
n = [int(input()) for i in range(2)]

for i in range(3):
  if A[i] == n[1] or A[i] == n[0]:
    continue
  else:
    print(A[i])

Solution (Python):
print("123".replace(input(),"").replace(input(),""))

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

Solution (Python):
A=int(input())
B=int(input())
C=list(range(1,4))
C.remove(A)
C.remove(B)
print(C[0])

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

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

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):
choices = ["1", "2", "3"]
choices.remove(input())
choices.remove(input())
print(choices[0])

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

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

Z = S+N

A = 1

if Z == 3 :
  A = 3

if Z == 4 :
  A = 2

print(A)

Solution (Python):
answer = [True, True, True]
answer[int(input()) - 1] = False
answer[int(input()) - 1] = False
print(answer.index(True) + 1)

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

print (6-a-b)

Solution (Python):
s = int(input())
t = int(input())
k = 0

if s == 1: 
  if t == 2:
    k = 3
  else:
    k = 2
elif s == 2:
  if t == 1:
    k = 3
  else:
    k = 1
else:
  if t == 2:
    k = 1
  else: 
    k = 2

print(k)

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

Solution (Python):
a = int(input())
b = int(input())
l = list(range(4))
del l[0]
l.remove(a)
l.remove(b)
print(l[0])

Solution (Python):
import numpy as np
import scipy as sp

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

Solution (Python):
a = int(input())
b = int(input())
total = sum(range(1,4))
print(total - (a + b))

Solution (Python):
a = int(input())
b = int(input())
total = sum(range(1,4))
print(total - (a + b))

Solution (Python):
A = input()
B = input()
ans = '123'
ans = ans.replace(A,'').replace(B,'')
print(ans)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    A = I()
    B = I()
    for i in range(1, 4):
        if i == A or i == B:
            continue
        print(i)

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

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

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

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

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

s.remove(a)
s.remove(b)
y=list(s)
print(y[0])

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

Solution (Python):
a = [int(input()) for i in range(2)]
b = [1, 2, 3]
b.remove(a[0])
b.remove(a[1])
print(b[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())
print(6-a-b)

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

Solution (Python):
a = input()
b = input()
choices = '123'
for c in choices:
  if((c != a) and (c != b)):
    print(c)

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

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

Solution (Python):
a_set = set([1,2,3])
a = int(input())
b = int(input())
b_set = set([a,b])
print(list(a_set - b_set)[0])

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

ans.remove(input())
ans.remove(input())

print(ans[0])

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


mod = 1000000007
inf = float('INF')




def solve():
    a = II()
    b = II()
    l = [3, 1, 2]
    l.remove(a)
    l.remove(b)
    print(l[0])
    return



if __name__ == '__main__':
    solve()

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

choise = [1, 2, 3]

choise.remove(A)
choise.remove(B)

print(choise[0])

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

ans = [1,2,3]

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

print(ans[0])

Solution (Python):
A = input()
B = input()
if A == "1"or B=="1":
	if A == "2"or B=="2":
		print("3")
	elif A == "3"or B=="3":
		print("2")
elif A == "2"or B=="2":
	if A == "3"or B=="3":
		print("1")

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

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

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

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

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

Solution (Python):


from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    a = ii()
    b = ii()
    for i in range(1,4):
        if a == i:
            continue
        elif b == i:
            continue
        print(i)
        exit()


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

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

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

a = [0,0,0]
a[A-1] = 1
a[B-1] = 1

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

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

Solution (Python):
print(int(input())^int(input()))

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

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

result = 6 - A - B

print(result)

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

result = 6 - A - B

print(result)

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 not in [A, B]: print(i)

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


List = [1,2,3]

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

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(6-A-B)

Solution (Python):


a=int(raw_input())
b=int(raw_input())
l=[1,2,3]
l.remove(a)
l.remove(b)
print l[0]

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

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

Solution (Python):
if __name__ == "__main__":
    answer=list(range(1,4))
    a=input()
    b=input()
    answer.remove(int(a))
    answer.remove(int(b))
    print(answer[0])

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

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

q.remove(A)
q.remove(B)

print(q[0])

Solution (Python):
def ans(n,m):
  if n+m==3:
    print("3")
  if n+m==4:
    print("2")
  if n+m==5:
    print("1")
a=int(input())
b=int(input())

ans(a,b)

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

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

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

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

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

Choice_list = [1,2,3]

if A in Choice_list:
    del Choice_list[Choice_list.index(A)]

if B in Choice_list:
    del Choice_list[Choice_list.index(B)]

print(Choice_list[0])

Solution (Python):

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

a = [1,2,3]
for t in [A,B]:
    a.remove(t)
print(a[0])

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    A=list(range(1,4))
    a=int(input())
    b=int(input())
    A.remove(a)
    A.remove(b)
    print(*A)
resolve()

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

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

Solution (Python):
print(input()^input())

Solution (Python):
A = int(raw_input())
B = int(raw_input())
ans = []
ans.append(A)
ans.append(B)

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

Solution (Python):
s = set(('1', '2', '3'))
for _ in range(2):
    s.remove(input())
print(s.pop())

Solution (Python):
s = set(['1', '2', '3'])
for _ in range(2):
    s.remove(input())
print(s.pop())

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)

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

n = ["1", "2", "3"]

n.remove(a)
n.remove(b)

print(n[0])

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

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

Solution (Python):
ans=6
for i in [0]*2:
  ans-=int(input())
print(ans)

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 


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

if a > b: a,b = b,a

ans = 1
if ans == a: ans = 2
if ans == b: ans = 3

print(ans)

Solution (Python):
a=int(input())
b=int(input())
st = set()
st.add(a)
st.add(b)
print(list(set([1,2,3]) - st)[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")
if A==2 and B==3:
  print("1")
if A==1 and B==3:
  print("2")
if A==2 and B==1:
  print("3")
if A==3 and B==2:
  print("1")
if A==3 and B==1:
  print("2")

Solution (Python):
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

a = INT()
b = INT()

l = [0]*3
l[a-1]=1
l[b-1]=1
print(l.index(0)+1)

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

Solution (Python):

import sys
input = sys.stdin.readline


a = int(input().strip())
b = int(input().strip())

print(6 - a - b)

Solution (Python):
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
na = lambda: list(map(int, stdin.readline().split()))
ni = lambda: int(ns())

a = ni()
b = ni()

x = min(a, b)
y = max(a, b)

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    A, B = int(input()), int(input())
    print(6 - A - B)


main()

Solution (Python):
s = "123"
a = input()
b = input()
s=s.replace(a,"")
s=s.replace(b,"")
print(s)

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

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 == 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)
"""

"""
if A > B:
    A, B = B, A

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

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

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)
"""
"""
if A > B:
    A, B = B, A

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

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

if A > B:
    A, B = B, A

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

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

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

if a == 1:
  if b == 2:
    ans = 3
  else:
    ans = 2
elif a == 2:
  if b == 1:
    ans = 3
  else:
    ans = 1
elif a == 3:
  if b == 1:
    ans = 2
  else:
    ans = 1
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 == 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,b=map(int,open(0));print(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):
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):

def solve():
    a = input()
    b = input()

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

if __name__ == '__main__':
    solve()

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

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

Solution (Python):
a,b=map(int,open(0));print(a^b)

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

Solution (Python):
from sys import stdin


a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())


for i in (1,2,3):
    if i in [a,b]:
        pass
    else:
        print(i)

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

print(k[0])

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")
    elif 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):
a = int(input())
b = int(input())
print(6 - a - b)

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())
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):
import math as m
from array import *
import sys
import datetime
import calendar


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

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

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

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

Solution (Python):
a,b=[int(input()) for _ in range(2)]
print(list(set([1,2,3])-set([a,b]))[0])

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

Solution (Python):
a = int(raw_input())
b = int(raw_input())
ans = set([1,2,3])
ip = set([a,b])
print (ans-ip).pop()

Solution (Python):
n=int(input())
m=int(input())
if 1!=n and m!=1:
  print(1)
elif 2!=n and 2!=m:
  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)

Solution (Python):
print(int(input())^int(input()))

Solution (Python):
A = int(input())
B = int(input())
list = [1,2,3]
list1 = []
list1.append(A)
list1.append(B)
for i in range(0,3):
    if list[i] not in list1:
        print(i+1)
    else:
        pass

Solution (Python):
a = [int(input()) for i in range(2)]
b = 6
for j in a:
    b = b - j
print(b)

Solution (Python):
choices = {1, 2, 3}
for _ in range(2):
    choices.remove(int(input()))
print(*choices)

Solution (Python):
a,b=map(int,open(0))
print(6-a-b)

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(A: int, B: int):
    x = {1,2,3}-{A,B}
    print(x.pop())
    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):
I = map(int, open(0))
print(6 - sum(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())

print(6 - a - b)

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

x = 6 - A - B
print(x)

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

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

Solution (Python):
import sys

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

print(6 - a - b)

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

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

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

Solution (Python):
n =int(input())
m = int(input())
print(6-n-m)

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

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

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

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

print((problem - set([a,b])).pop())

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

Solution (Python):
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

a = ri()
b = ri()
print(6 - a - b)

Solution (Python):
print(*{1,2,3}-set(map(int,open(0))))

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

Solution (Python):
a = int(input())
b = int(input())
abc = [1,2,3]
for i in range(3):
  if abc[i] == a or abc[i] == b:
    continue
  else:
    print(i+1)
    break

Solution (Python):

import sys


def solve(A: int, B: int):
    ab = [A,B]
    if 1 not in ab:
        print(1)
    elif 2 not in ab:
        print(2)
    elif 3 not in ab:
        print(3)

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

Solution (Python):
a=int(input())
b=int(input())
for i in range(3):
    if((i+1==a or i+1==b)==False):
        print(i+1)

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

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

res.append(int(input()))
res.append(int(input()))

answer = [x for x in ans if x not in res]
print(answer.pop())

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

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

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


x = int(input())
z = int(input())

y = [1,2,3]

y.remove(x)
y.remove(z)

print(y[0])

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

print(6-a-b)

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

Solution (Python):
ans = [1,2,3]
in_1 = int(input())
in_2 = int(input())

ans.remove(in_1)
ans.remove(in_2)
for i in ans:
    print(i)

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

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

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

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

print(x.pop(0))

Solution (Python):
from sys import stdin


a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())


for i in (1,2,3):
    if i in [a,b]:
        pass
    else:
        print(i)

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

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

Solution (Python):
input_a = int(input())
input_b = int(input())

if (input_a == 1):
    if(input_b == 2):
        print(3)
    else:
        print(2)
elif (input_a == 2):
    if(input_b == 1):
        print(3)
    else:
        print(1)
else:
    if(input_b == 1):
        print(2)
    else:
        print(1)

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

list = [1,2,3]
list.pop(list.index(int(A)))
list.pop(list.index(int(B)))
print(list[0])

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

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

Solution (Python):
import numpy as np

A = list(map(int , input().split()))
B = list(map(int , input().split()))

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

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

c = a+b

print(6-c)

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

Solution (Python):



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

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

Solution (Python):
A = input()
a = int(A)
B = input()
b = int(B)
c = a + b

if c == 3:
    print('3')
if c == 5:
    print('1')
if c == 4:
    print('2')

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

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())
C = {1, 2, 3}
D = {A, B}
E = C - D
print(E.pop())

Solution (Python):
a = int(input())
b = int(input())
ab = [a, b]
answer_list = [1, 2 ,3]
for answer in answer_list:
    if not answer in ab:
        print(answer)

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

c = 6 - a- b
print (c)

Solution (Python):
import sys
def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(var):
	print(var, file=sys.stderr)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))




a = []
a.append(I()[0])
a.append(I()[0])
for i in range(1, 4):
	if i not in a:
		print(i)
		break

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

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

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

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

A,B = map(int,read().split())
x = 6 - A - B
print(x)

Solution (Python):

if __name__ == "__main__":
    ret = [1, 2, 3]
    A = input()
    B = input()
    ret.remove(int(A))
    ret.remove(int(B))
    print(ret[0])

Solution (Python):
print("123".replace(input(),"").replace(input(),""))

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

Solution (Python):
code1 = int(input())
code2 = int(input())
if code1==1 and code2==2:
  print(3)
elif code1==1 and code2==3:
  print(2)
elif code1==2 and code2==3:
  print(1)
elif code1==2 and code2==1:
  print(3)
elif code1==3 and code2==1:
  print(2)
else:
  print(1)

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

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

c.remove(a)
c.remove(b)

print(c[0])

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

ans = [1,2,3]

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

print(ans[0])

Solution (Python):
li=set([1,2,3])
a= int(input())
b= int(input())
req=set([a,b])
ans = li-req
for i in ans:
  print(i)