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

"""
tmp = [a, b]
tmp.sort()
if tmp[0] == 2:
    print(1)
if tmp[0] == 1 and tmp[1] == 3:
    print(2)
else:
    print(3)
"""

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

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

Solution (Python):
def resolve():

    ans={1,2,3}
    L={int(input()) for i in range(2)}
    for i in ans-L:
        print(i)

resolve()

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

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

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):
def solve():
    a=int(input())
    b=int(input())
    print(6-a-b)
if __name__ == "__main__":
    solve()

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]

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

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()) for _ in range(2)]

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

Solution (Python):
import sys

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

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

if __name__ ==  '__main__':
    main()

Solution (Python):

import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    ans = 6
    print(ans//II()//II())

if __name__ == '__main__':
    main()

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

Solution (Python):
print(6-sum(map(int,open(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(6-A-B)

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

print(l[0])

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)  
to_index = lambda x: int(x) - 1  
print_list_in_2D = lambda x: print(*x, sep="\n")  


def input_int(): return int(input())

def map_int_input(): return map(int, input())

MII = map_int_input

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

def MII_to_index(): return map(to_index, input())

def MII_split_to_index(): return map(to_index, input().split())


def list_int_inputs(): return list(map(int, input()))

LII = list_int_inputs

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


def LII_2D(rows_number): return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number): return [LII_split() for _ in range(rows_number)]

A = input_int()
B = input_int()

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

print(list(ans)[0])

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

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

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

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

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

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

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

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

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

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

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

ans_set = set(["1", "2", "3"])
ans_set.discard(A)
ans_set.discard(B)

print(ans_set.pop())

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

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

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

ans_list = [1, 2, 3]

ans_list.remove(a)
ans_list.remove(b)

print(ans_list[0])

Solution (Python):
import sys
array=[]
for line in sys.stdin.readlines():
    array.append(line.rstrip())
if not  "1" in array:
       print("1")

elif  not "2" in array:
    print("2")

elif  not "3" in array:
   print("3")

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

c=[1,2,3]
c[a-1]=0
c[b-1]=0

print(max(c))

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

print(6-A-B)

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

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

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

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

lst = [1,2,3]

lst.remove(a)
lst.remove(b)

print(lst[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):
data = [int(input()), int(input())]

if not(1 in data):
  print(1)
elif not(2 in data):
  print(2)
elif not(3 in data):
  print(3)

Solution (Python):
data = [input(), input()]

if not('1' in data):
  print(1)
elif not('2' in data):
  print(2)
elif not('3' in data):
  print(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())
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):
List=[1,2,3]
a=int(input())
b=int(input())
List.remove(a)
List.remove(b)
print(List[0])

Solution (Python):


import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy





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

Solution (Python):
a = {1, 2, 3}
b = set()
for i in range(2):
  b.add(int(input()))
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())
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())
for i in [1,2,3]:
    if i != A and i != B:
        print(i)

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

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

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

out = 6 - A -B
print(out)

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

Solution (Python):
A = int(input())
B = int(input())
 
i = 1
while (i <= 3):
  if (i == A or i == B):
    i = i+1
  else:
    print(i)
    break

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

Solution (Python):

import sys


def solve(A: int, B: int):
    l = [1,2,3]
    l.remove(A)
    l.remove(B)
    print(l[0])
    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())
C=6-(A+B)
print(C)

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

main()

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

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

if A+B == 3:
    ans = 3
elif A+B == 4:
    ans = 2
elif A+B == 5:
    ans = 1
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())

print(6-A-B)

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

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

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

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

l = [1,2,3]

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

print(l[0])

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

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

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

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

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

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

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

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


zenbu = {1,2,3}
A = int(input())
B = int(input())
bubun = {A,B}

kotae = zenbu - bubun

print(*kotae)

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
hoge = [0 for i in range(2)]

for i in range(2):
  hoge[i] = input()
  
A = int(hoge[0])
B = int(hoge[1])

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

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):
C = [int(input()) for i in range(2)]
if C[0] == 1:
  print(5-C[1])
elif C[0] == 2:
  print(4-C[1])
else:
  print(3-C[1])

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

Solution (Python):
import sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]
def exit():
    import sys
    sys.exit(0)
def perm_sub(li, used):
    if len(li) == len(used):
        return [deque()]
    k = []
    for i in range(len(li)):
        if i in used:
            continue
        used.add(i)
        sub_list = perm_sub(li, used)
        for sub in sub_list:
            sub.appendleft(li[i])
        k.extend(sub_list)
        used.discard(i)
    return k
def perm_li(li):
    return perm_sub(li, set())
def perm_n(n):
    return perm_sub(list(range(n)), set())
def join_i(li, sep=""):
    return sep.join([str(e) for e in li])
def li2n(li):
    n, base = 0, 1
    for i in range(len(li)-1, -1, -1):
        n += li[i] * base
        base *= 10
    return n
def sli2ili(li):
    return [int(s) for s in li] 
def prime_list(n):
    li = [i for i in range(2, n+1)]
    for i in range(len(li)):
        if li[i] >= int(math.sqrt(n)):
            break
        if li[i] == -1:
            continue
        for j in range(i+1, len(li)):
            if li[j] % li[i] == 0:
                li[j] = -1
    return [n for n in li if n != -1]
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while True:
        r = a % b
        if r == 0: return b
        a, b = b, r
def lcm(a, b):
    return int(a * b / gcd(a,b))
def all_subset(li):
    s = []
    n = len(li)
    for bit in range(0, (1<<(n+1))):
        ss = set()
        for i in range(0, n):
            if (bit & (1 << i)):
                ss.add(li[i])
        s.append(ss)
    return s
a = load()
b = load()

print(6-a-b)

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

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

total = a + b
print(6-total)

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

print(6 - a - b)

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

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

Solution (Python):
dic = {
  "13":2,
  "12":3,
  "23":1
}

print(dic["".join(sorted([input(), input()]))])

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

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

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

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9 +7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


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

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


def lcm(a, b):
    return a * b // gcd (a, b)





a = inputI()
b = inputI()

print(6-a-b)

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

total = a + b
print(6-total)

Solution (Python):
from sys import stdin
import math

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

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

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

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

Solution (Python):
n = [1, 2, 3]
a, b = [int(input()) for _ in range(2)]

for i in a, b:
    n.remove(i)

print(n[0])

Solution (Python):











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





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

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

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

Solution (Python):

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
	lis = [1, 2, 3]
	lis.remove(INT())
	lis.remove(INT())
	print(*lis)
	

if __name__=='__main__':
	main()

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

Solution (Python):
import sys

input = sys.stdin.readline

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

for value in ans:
    if A == value or B == value:
        continue
    else:
        print(value)

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

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(3):
  if(i+1!=A and i+1!=B):
    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(6 -a-b)

Solution (Python):
ans = 0
for _ in range(2):
    a = int(input())
    ans += a
print(6 - 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 = 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()
X = {"1", "2", "3"}
ans = list(X-{A, B})
print(ans[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())

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

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

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

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

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

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

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

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

print(6-A-B)

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

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

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

A = input().strip()
B = input().strip()
c = {A, B}
l = {'1', '2', '3'}
print((l - c).pop())

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

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

Solution (Python):
s = set([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 = str(input())
b = str(input())
ans = '123'
ans = ans.replace(a,'').replace(b,'')
print(ans)

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

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

print(6-a-b)

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

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

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

Solution (Python):
a, b = [int(input()) for _ in range(2)]
l = list([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 i not in [a, b]:
    print(i)

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

print(6-A-B)

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

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

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

Solution (Python):
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):
def solve():
    N = int(input())
    M = int(input())
    l = set([1,2,3])
    l.remove(N)
    l.remove(M)
    return list(l)[0]

print(solve())

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

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

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

Solution (Python):
l=[int(input()) for _ in range(2)]
print(l[0]^l[1])

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

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

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):
print(6-sum([int(input())for _ in range(2)]))

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

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

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

print(array[0])

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

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

print(6-A-B)

Solution (Python):

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

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

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

N = [A,B]

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

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

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

    isCorrect = [True] * 4
    isCorrect[A] = False
    isCorrect[B] = False

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

if __name__ == '__main__':
    solve()

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

ans = [1, 2, 3]

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


print(ans[0])

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

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

Solution (Python):
S = {1,2,3}
A = {int(input())}
B = {int(input())}
C = S - A - B
V = C.pop()
print(V)

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

a = set([1, 2, 3]) - set([A]) - set([B])
for i in a:
    print(i)

Solution (Python):
ans = {1, 2, 3} - {int(input()) for _ in range(2)}
print(ans.pop())

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

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

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

lst = list(range(1,4))

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

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

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

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

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

    problem = [1,2,3]

    problem.remove(A)
    problem.remove(B)

    print(problem[0])


if __name__ == "__main__":
    main()

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

q = {1,2,3}

q -= {a,b}
ans = list(q)

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 = 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:
    c = i
print(c)