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

la = [True] * 4

la[a] = False
la[b] = False

for i in range(1, 4):
    if la[i]:
        print(i)

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

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

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


def main():
    sc = Scan()
    a = sc.intarr()[0]
    b = sc.intarr()[0]

    print(6 - a - b)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


def display(array):
    for a in range(len(array)):
        if len(array) - a != 1:
            print(array[a], end=' ')
        else:
            print(array[a])


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


main()

Solution (Python):

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

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

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

Solution (Python):
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

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

A=one_int()
B=one_int()

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

print(list(temp-set([A])-set([B]))[0])

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

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

temp = [1, 2, 3]
if a in temp:
    temp.remove(a)
if b in temp:
    temp.remove(b)
print(temp[0])

Solution (Python):


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

l=[1,2,3]
l.pop(max(A,B)-1)
l.pop(min(A,B)-1)

print(l[0])

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

l = [1,2,3]

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

print(*l)

Solution (Python):
words = lambda t : list(map(t, input().split()))

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

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

Solution (Python):

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time
from fractions import gcd



def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['No', 'Yes']
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False



def main():
    A = I()
    B = I()
    ans = {1: True, 2:True, 3:True}
    ans[A] = False
    ans[B] = False

    for i in ans.keys():
        if ans[i] is True:
            print(i)
            return


if __name__ == '__main__':
    main()

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

aaa = set([1,2,3])
aa = set()

a = onem()
aa.add(a)
b = onem()
aa.add(b)

print((aaa-aa).pop())

Solution (Python):
import sys, math
from collections import defaultdict
from copy import deepcopy
import itertools
input = sys.stdin.readline



A = int(input())
B = int(input())
S = set([1,2,3])
S.discard(A)
S.discard(B)
ans = S.pop()
print(ans)

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

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

Solution (Python):
A=int(input())
B=int(input())
C=6-A-B
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)
elif A != 3 and B != 3:
	print(3)

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

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

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

print(6-(a+b))

Solution (Python):


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

ans = 6 - A - B

print(ans)

Solution (Python):
I=lambda:list(map(int,input().split()))
a=int(input())
b=int(input())
x=[1,2]
y=[1,3]
z=[2,3]
aa=[a,b]
aa.sort()
if aa==x:
    print(3)
elif aa==y:
    print(2)
elif aa==z:
    print(1)

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

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

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):
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


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


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]



def A():
    a = I()
    b = I()
    print(6 - a - b)
    return



def B():
    return



def C():
    return



def D():
    return



def E():
    return



def F():
    return



def resolve():
    A()
    return



if __name__ == "__main__":
    A()

Solution (Python):
from sys import stdin
A = int(stdin.readline().rstrip())
B = int(stdin.readline().rstrip())
ans = {1,2,3} - {A} - {B}
print(list(ans)[0])

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

print(6-a-b)

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

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

Solution (Python):
import sys
import math
import re
import io

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


if __name__ == "__main__":
    main()

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

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

print (6-a-b)

Solution (Python):
answers = ["1", "2", "3"]
answers.remove(input().strip())
answers.remove(input().strip())
print(answers[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):
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())
ls = [1,2,3]
ls.remove(a)
ls.remove(b)
print(ls[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)
  else:
    print(1)

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):
A = int(input())
B = int(input())
a, b = sorted((A, B))
if (a, b) == (1, 2):
    print(3)
elif (a, b) == (1, 3):
    print(2)
elif (a, b) == (2, 3):
    print(1)

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

Solution (Python):
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): 
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a): 
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): 
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): 
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def main():
    a = int(input())
    b = int(input())
    for i in range(1,4):
        if i==a:
            continue
        elif i==b:
            continue
        else:
            print(i)
    return

if __name__=='__main__':
    main()

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

Solution (Python):
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())
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 range(3):
    if A == i+1 or B == i+1:
        continue
    else:
        print(i+1)

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

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

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

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

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

print(6-(a+b))

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

r = [1,2,3]
r = [i for i in r if i != x and i != y]

print(r[0])

Solution (Python):
ans = 6
for _ in range(2):
  ans -= int(input())
print(ans)

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

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

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

print(*num)

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

Solution (Python):
a=int(input())
b=int(input())
AB={a,b}
if 1 in AB:
  if 2 in AB:
    print(3)
  else:
    print(2)
else:
  print(1)

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

for i in li:
  if i not in [A, B]:
    print(i)
    exit()

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

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

ans = 6

print(ans - A - B)

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

Solution (Python):
ab = [int(input()) for _ in range(2)]
for i in range(1,4):
  if not i in ab:
    print(i)

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

targ = (A, B)
for i in range(3):
    if (i + 1) not in targ: print(i + 1)

Solution (Python):
A=int(input())
B=int(input())
x=[1]*3
x[A-1]=x[B-1]=0
print(x.index(1)+1)

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


stdin = sys.stdin

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

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

Solution (Python):
B = int(input())
C = int(input())
l = []
l.append(B)
l.append(C)

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

Solution (Python):
def roundone(s):
    ans = [1, 1, 1]
    for i in s:
        ans[i - 1] = 0
    for a in range(len(ans)):
        if ans[a]:
            print(a + 1)

if __name__ == "__main__":
    import sys
    in_str = []
    for line in sys.stdin:
        in_str.append(int(line))
    roundone(in_str)

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

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

S = set([1, 2, 3])
S -= set([A, B])

print(list(S)[0])

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

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

total = 6
A = int(input())
B = int(input())




print(total -A - B)

Solution (Python):
a = int(input())
b = int(input())
ans = 6-a-b
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")
else:
    print("3")

Solution (Python):
a=int(input())
b=int(input())
for i in range(1,4,1):
    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):
import sys
input = sys.stdin.readline


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



if __name__ == '__main__':
    main()

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

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

Solution (Python):
A,B = [int(input()) for i in range(2)]
print(6//A//B)

Solution (Python):
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(a, b):
    return 1 + 2 + 3 - a - b
    
    



do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    
    
    a = int(input())
    b = int(input())
    
    print(sol(a, b))

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

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

ans = [1,2,3]

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

print(*ans)

Solution (Python):



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

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

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

print(list(s)[0])

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

C = 6 - (A +B)

print C

Solution (Python):
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)
    else: print(1)


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

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

Solution (Python):


def resolve():
    A = int(input().rstrip())
    B = int(input().rstrip())


    print(6 - A - B)

if __name__ == "__main__":
    resolve()

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

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

print(list({1,2,3}-{A}-{B})[0])

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

sum = 6

ans = sum - A - B
print(ans)

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 range(1,4):
    if (i != a)and(i != b):
        print(i)

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())
for i in range(3):
    if i+1 != a and i+1 != b:
        print(i+1)

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






import math
import statistics
import numpy as np
import queue

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

Solution (Python):
wrong = input() + input()
for i in range(1, 4):
    if str(i) not in wrong:
        print(i)

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

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

print(res[0])

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

Solution (Python):


a = int(input().split()[0])
b = int(input().split()[0])
ans = set([1, 2, 3]) - set([a, b])
ans = list(ans)[0]

print(ans)

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

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

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())
ret = {
  5:1,
  4:2,
  3:3
}
print(ret[A+B])

Solution (Python):


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

C = [A, B]

if 2 not in C:
    print(2)
if 1 not in C:
    print(1)
if 3 not in C:
    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):
A = int(input())
B = int(input())

st = set([A, B])

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

ans = p - st
print(list(ans)[0])

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

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


def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def main():
    A = int(input())
    B = int(input())

    s = list({1, 2, 3} - {A, B})
    print(s[0])

if __name__ == "__main__":
    main()

Solution (Python):
if __name__ == '__main__':
    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())
print(6-a-b)

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

Solution (Python):
A, B= map(int, open(0).read().split())
print(6-A-B)

Solution (Python):
a = int(input())
b = int(input())
s = list(sorted([a, b]))

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

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):
ans = [1,2,3]
A,B = int(input()), int(input())
del ans[ans.index(A)]
del ans[ans.index(B)]
print(*ans)

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

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):
x = {1: True, 2: True, 3: True}
a = int(input())
b = int(input())

del x[a]
del x[b]

print(list(x.keys())[0])

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

Solution (Python):



def main():
    xs = {1, 2, 3}
    xs.discard(int(input()))
    xs.discard(int(input()))
    print(xs.pop())


if __name__ == "__main__":
    main()

Solution (Python):
A = int(input())
B = int(input())
print(1+2+3 -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):
ans = {1, 2, 3}
for i in range(2):
    num = int(input())
    ans.discard(num)

res = ans.pop()
print(res)

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

Solution (Python):
n=int(input())
m=int(input())
nm=n+m
if nm==3:
    print(3)
elif nm==4:
    print(2)
else:
    print(1)

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

c = [a,b]

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

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

ans = [1, 2, 3]
wrong = [A, B]

for i in ans:
    if i not in wrong:
        print(i)

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 = []
a.append(int(input()))
a.append(int(input()))

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

Solution (Python):
num1 = int(input())
num2 = int(input())
sum = 6-num1-num2
print(sum)

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 and i != b: print(i)

Solution (Python):
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

lis = []
for i in range(2):
    lis.append(I())
print(6-sum(lis))

Solution (Python):
import sys

a, b = map(int, sys.stdin.read().split())

def main():
    ans = 6 - a - b
    return ans

if __name__ == '__main__':
    ans = main()
    print(ans)

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

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

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

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

print(6-n_list[0]-n_list[1])

Solution (Python):
import sys

read = sys.stdin.read
A, B = map(int, read().split())

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

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

for num in temp:
  if num == a or num == b:
    continue
  print(num)

Solution (Python):


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

print(6-A-B)

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

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

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

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

L = [0, 0, 0]
L[A-1] += 1
L[B-1] += 1
for i in range(3):
    if L[i] == 0:
        print(i+1)
        break

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

Solution (Python):

import sys
input = sys.stdin.buffer.readline


from collections import defaultdict


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


def main():
	A = int(input())
	B = int(input())
	D = defaultdict(int)
	D[A] += 1
	D[B] += 1
	if D[1] == 0:
		print(1)
	elif D[2] == 0:
		print(2)
	else:
		print(3)
	


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

ans = {1, 2, 3}

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

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
sys.setrecursionlimit(10 ** 7)

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)

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

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

print(6 - A - B)

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

for a in ans:
  if not a in s:
    print(a)

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

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

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

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

for x in range(1, 4):
    if A == x or B == x:
        continue
    else:
        print(x)

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

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

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

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

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

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 = [A, B]

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

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

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

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 = input()
B = input()

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

print(ans[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 = int(input())
b = int(input())
l  = [a,b]
for i in range(1,4):
    if not i in l:
        print(i)

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

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

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

Solution (Python):

a = int(input())
b = int(input())
l = [1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])

Solution (Python):
a = int(input())
b = int(input())
ans = [1, 2, 3]
for num in ans:
    if num != a and num != b:
        print(num)
        exit(0)

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

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

main()