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










































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    A = int(lines[0])
    B = int(lines[1])
    
    
    
    
    
    
    
    
    

    result = 6 - A - B

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3', '1']
        lines_export = [2]
    if pattern == 2:
        lines_input = ['1', '2']
        lines_export = [3]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

if (A, B) == (1, 2) or (A, B) == (2, 1):
    print(3)
elif (A, B) == (1, 3) or (A, B) == (3, 1):
    print(2)
else:
    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):
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 = [a, b]
for i in range(1, 4):
    if i not in A:
        print(i)

Solution (Python):
L=[int(input()),int(input())]
if not 1 in L:
  print(1)
elif not 2 in L:
  print(2)
else:
  print(3)

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

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

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

Solution (Python):
print(*set([input(),input()])^set([*'123']))

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

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

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

Solution (Python):
a=int(input())
b=int(input())
d=[a,b]
c=[1,2,3]
for i in range(0,len(c)):
    if(c[i] not in d):
        print(c[i])
        break

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

print(ans)

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):
x=int(input())
y=int(input())
l=[1,2,3]
l.remove(x)
l.remove(y)
print(l[0])

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

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

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

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    A = int(input())
    B = int(input())
    C = list(set([1, 2, 3]) - set([A, B]))
    print(C[0])

    return 0

if __name__ == "__main__":
    solve()

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

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

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

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

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

array.pop(array.index(A))
array.pop(array.index(B))
print(*array)

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

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

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

Solution (Python):
A = int(input())
B = int(input())
nums = [1, 2, 3]
nums.remove(A)
nums.remove(B)
print(nums[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())
print(6-A-B)

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

numbers.remove(a)
numbers.remove(b)

print(numbers[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.discard(A)
ans.discard(B)
print(*ans)

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

tab=[1,2,3]

tab[a-1]=0
tab[b-1]=0

for j in range(3):
    if tab[j]!=0:
        print(tab[j])

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

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

Solution (Python):
def main():
    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 == 3 and b == 1 or a == 1 and b == 3:
        print(2)
         
if __name__ == '__main__':
    main()

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

c =6
print(c-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):
A =int(input())
B =int(input())
res = 6- A -B
print(res)

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

Solution (Python):
answer = [True] * 3

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

answer[a - 1] = False
answer[b - 1] = False

for i, ans in enumerate(answer):
    if ans:
        print(i + 1)

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

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 os, sys, re, math

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

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

from sys import exit
def main():
  A = int(input())
  B = int(input())
  
  ans = [1,2,3]
  
  ans.remove(A)
  ans.remove(B)
  
  print(str(ans).replace('[', '').replace(']', ''))
  
  
main()

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

Solution (Python):
a=int(input())
b=int(input())
l=[]
l.append(a)
l.append(b)
if 1 not in l:
  print(1)
elif 2 not in l:
  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())

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

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

l = {1, 2, 3}
m = {a, b}
ans = list(l ^ m)

print(ans[0])

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

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

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

for i in range(1,4):
    if i not in [A,B]:
        print(i)
        break

Solution (Python):
def roundone(a, b):

    abc = "123"

    return abc.replace(a, "").replace(b, "")

def main():
    a = str(input())
    b = str(input())
    print(roundone(a, b))

if __name__ == '__main__':
    main()

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

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

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

list = ['1', '2', '3']

list.remove(a)
list.remove(b)

print(*list)

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

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

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

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

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

Solution (Python):
A = int(input())
B = int(input())
SET = set({1,2,3})
SET.remove(A)
SET.remove(B)
for e in SET:
    print(e)

Solution (Python):
lst = [1, 2, 3]
for _ in [0] * 2:
    lst.remove(int(input()))
print(lst[0])

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

Solution (Python):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A = int(readline())
B = int(readline())
AB = []
AB.append(A)
AB.append(B)
S = [1,2,3]
for i in range(3):
    if S[i] not in AB:
        print(S[i])
        sys.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):
print(6 - int(input()) - int(input()))

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

Solution (Python):
arr=[0,0]
arr[0] = int(input())
arr[1] = int(input())

if 1 not in arr:
    print('1')
elif 2 not in arr:
    print('2')
elif 3 not in arr:
    print('3')

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

a = k()
b = k()
p = []

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

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

Solution (Python):
s = sorted([int(input()), int(input())])
print(3 if s == [1, 2] else (2 if s == [1, 3] else 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) or (a==2 and b==1):
    print('3')
if (a==1 and b==3) or (a==3 and b==1):
    print('2')
if (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())

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

Solution (Python):
a = int(input())
b = int(input())
s1 = {1,2,3}
s2 = {a,b}
ans = s1 - s2
print(*ans)

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

d = {1:0,2:0,3:0}

d[a] += 1
d[b] += 1

for k,v in d.items():
  if v==0: print(k)

Solution (Python):
L = []
L.append(int(input()))
L.append(int(input()))

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

Solution (Python):
def main():
    A=int(input())
    B=int(input())
    for i in range(1,4):
        if i not in (A,B):
            print(i)
            return
main()

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


a = int(input())
b = int(input())
s = set(range(1,4))
s.remove(a)
s.remove(b)
print(s.pop())

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

A = int(input())
B = int(input())
print(list({1,2,3}-{A,B})[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) 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):
li=[1,2,3]
li.pop(li.index(int(input())))
li.pop(li.index(int(input())))
print(li[0])

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

Solution (Python):
result = {1, 2, 3}

result.discard(int(input()))
result.discard(int(input()))

print(result.pop())

Solution (Python):






s = set([1, 2, 3])
s.discard(int(input()))
s.discard(int(input()))
print(*s)

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

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

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

A = str(input())
B = str(input())
ans = [str(i) for i in range(1,4)]

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

Solution (Python):
def main():
    s=set('123')
    a=int(input())
    b=int(input())
    s.remove(str(a))
    s.remove(str(b))
    print(s.pop())

main()

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

Solution (Python):
l = [1,2,3]
A = int(input())
B = int(input())
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 = int(input())
B = int(input())
print(6-A-B)

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

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

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

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

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

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

print(answers[0])

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

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

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

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

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

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

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    A = int(readline())
    B = int(readline())
    
    if A > B:
        A,B= B, A
    
    if A == 1:
        if B == 2:
            print('3')
        else:
            print('2')
    else:
        print('1')
    
    return


if __name__ == '__main__':
    main()

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

Solution (Python):



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

print(6-A-B)

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

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

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

print(6 - A - B)

Solution (Python):

print(6-eval(input()+"+"+input()))

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

Solution (Python):
A = int(input())
B = int(input())
print("{}".format(6 - (A + B)))

Solution (Python):
print(6-sum(map(int,open(0))))

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

print(6-(x+y))

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

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

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

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

num_list = [1,2,3]

num_list.remove(A)
num_list.remove(B)

print(num_list[0])

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

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

c = 6 - (a+b)
print(c)

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

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

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

print(6-a-b)

Solution (Python):
input_line = set([])
input_line.add(int(input()))
input_line.add(int(input()))

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

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

ans = 6-a-b
print(ans)

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

ret = 1
for i in range(1, 3+1):
    if i != a and i != b:
        ret = i
        break

print("{}".format(ret))

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

se = set(["1","2","3"])

a = se-set([A,B])

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

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)
elif A*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())
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())
s=[1,2,3]
s.remove(a)
s.remove(b)
print(s[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())
print(6 - a - b)

Solution (Python):
arr = [1,2,3]
one = int(input())
two = int(input())

arr[one-1] = 0
arr[two-1] = 0

for i in arr:
  if i > 0: print(i)

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

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

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

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

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

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

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

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

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

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

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 a != i and b != i:
        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 =sorted( [int(input()) for i in range(2)])
print("1" if a == [2,3] else "2" if a == [1,3] else "3")

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

for x in range(1, 4):
    if x not in [A, B]:
        print(x)
        break

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("".join(map(str,c)))

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

Solution (Python):

x = int(input())
y = int(input())
z = [1,2,3]
del(z[z.index(x)])
del(z[z.index(y)])
print(z[0])

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

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

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

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

print(SUM-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):
def main():
    A = int(input())
    B = int(input())
    print(6-(A+B))

main()

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

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

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

print(*ans)

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

Solution (Python):


from sys import stdin

A = int(stdin.readline().strip())
B = int(stdin.readline().strip())

print(6-A-B)

Solution (Python):

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

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

    print(6-a-b)


if __name__ == '__main__':
    main()

Solution (Python):

"""
A - Round One
https://atcoder.jp/contests/abc148/tasks/abc148_a

"""
import sys


def solve(A, B):
    return set([1, 2, 3]) - set([A, B])


def main(args):
    A, B = int(input()), int(input())
    ans = solve(A, B)
    print(*ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
a = int(input())
b = int(input())
if a == 1 :
    if b == 2 :
        print("3")
    if b == 3 :
        print("2")
if a == 2 :
    if b == 1 :
        print("3")
    if b == 3 :
        print("1")
if a == 3 :
    if b == 2 :
        print("1")
    if b == 1 :
        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 = int(input())
B = int(input())
if A == 1 and B == 2:
  print(3)
elif A == 2 and B == 1:
  print(3)
elif A == 1 and B == 3:
  print(2)
elif A == 3 and B == 1:
  print(2)
elif A == 2 and A == 3:
  print(1)
else:
  print(1)

Solution (Python):
a = int(input())
b = int(input())
ans = [0]*3
ans[a-1] = 1
ans[b-1] = 1
print(ans.index(0) + 1)

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


if __name__ == '__main__':
    solve()

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

int(A)
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):
result = [1,2,3]
first_input = int(input())
second_input = int(input())
result.remove(first_input)
result.remove(second_input)
print(result[0])

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

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

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


if __name__ == '__main__':
    q_a()

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

Solution (Python):
a = 0

a += int(input())
a += int(input())

print(6 - a)

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

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

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

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

print(ans[0])

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

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

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

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

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

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

Solution (Python):
ans={'1','2','3'} - {input(),input()}
print(ans.pop())

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

D =[1,2,3]


if A in D:
    D.remove(A)

if B in D:
    D.remove(B)

print(D[0])

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

Solution (Python):
import sys
a = []
for l in sys.stdin:
    a.append(int(l))

print(list(set([1,2,3]) - set(a))[0])

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

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

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

answer = [str(i) for i in range(1, 4)]

answer.remove(A)
answer.remove(B)
print(''.join(answer))

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

Solution (Python):
A = int(input())
B = int(input())
L = A + B
print(5 - L + 1)

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

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

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

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

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

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

x = [1,2,3]

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

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

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

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

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

Solution (Python):
x='123'
for _ in range(2): 
  x=x.replace(input(),'')
print(x)

Solution (Python):
a,b=map(int,open(0).read().split())
if a+b==3:
  print(3)
elif a+b==5:
  print(1)
else:
  print(2)

Solution (Python):
A = int(input())
B = int(input())
num_list =[]
num_list.append(A)
num_list.append(B)

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

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

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

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

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

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

print(6-A-B)