Problem:
 Score: 100 points    Problem Statement  Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1 , 2 , and 3 .  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.      Constraints   Each of the numbers A and B is 1 , 2 , or 3 .  A and B are different.         Input  Input is given from Standard Input in the following format:  A  B       Output  Print the correct choice.        Sample Input 1 3
1      Sample Output 1 2  When we know 3 and 1 are both wrong, the correct choice is 2 .       Sample Input 2 1
2      Sample Output 2 3

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

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

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

print(6-a-b)

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

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

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

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

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

print(int(list(c)[0]))

Solution (Python):
sum=int(input()) + int(input())
print('1' if sum==5 else '2' if sum==4 else '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())
print(6-a-b)

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

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

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

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

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

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

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):
import sys
row = sys.stdin.readline
def read_int(row):
    return int(row().rstrip())

A,B= [read_int(row) for i in range(2)]

print((set({1,2,3}) - set({A,B})).pop())

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

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

Solution (Python):


S = {1, 2, 3}
a, b = int(input()), int(input())

S.remove(a)
S.remove(b)

for s in S:
    print(s)

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

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

print(ans)

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

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

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

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

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

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

elif A == 2:
    if B == 1:
        ans = 3
    elif B == 3:
        ans = 1

elif A == 3:
    if B == 1:
        ans = 2
    elif B == 2:
        ans = 1

print(ans)

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

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

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

Solution (Python):
A=int(input())
B=int(input())
flag=[0,0,0]
flag[A-1]=1
flag[B-1]=1
cnt=1;
for i in flag:
    if i==0:
        print(cnt)
        break
    cnt+=1

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

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

if __name__ == "__main__":
    main()

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

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

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

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

print(6-A-B)

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

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

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

print("123".replace(a,"").replace(b,""))

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

list_right = [1, 2, 3]

list_right.remove(a)
list_right.remove(b)

print(list_right[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 = int(input())
b = int(input())

print(6-a-b)

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

choices = [True for _ in range(4)]

choices[a] = False
choices[b] = False

for i in range(1,4):
    if choices[i] == True:
        print(i)

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

Solution (Python):
import sys

stdin = sys.stdin

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

def main():
    a = ni()
    b = ni()

    print(6 - a - b)

if __name__ == '__main__':
    main()

Solution (Python):


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

print(str(6-A-B))

Solution (Python):

A = int(input())
B = int(input())
answer = 6 - A - B
print(answer)

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

ans = [i for i in ans_list if i != A and i != B]
print(ans[0])

Solution (Python):
import sys
 
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
 
 
a=int(input())
b=int(input())
	  
print(6//(a*b))

Solution (Python):
ans = set(range(1, 4))
ans -= {int(input())}
ans -= {int(input())}
print(*ans)

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

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

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

kaitou = [1,2,3]
kaitou.remove(a)
kaitou.remove(b)
print(kaitou[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):
if __name__ == '__main__':
    kouho = [1, 2, 3]
    a = int(input())
    b = int(input())
    kouho.remove(a)
    kouho.remove(b)
    print(kouho[0])

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

print(int(6/A/B))

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

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

print(6-a-b)

Solution (Python):
L = [1, 2, 3]
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(int(list(set([1, 2, 3]) - set([a, b]))[0]))

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

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

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

ans = 0

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

print(ans)

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

wrong = [A, B]

for i in range(1,4):
  if str(i) in wrong:
    pass
  else:
    print(i)

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
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

A = INT()
B = INT()

ans = [1, 2, 3]

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

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

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

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

Solution (Python):

print(6-int(input())-int(input()))

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

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

s.remove(A)
s.remove(B)

print(s.pop())

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

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

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

a = int(input())
b = int(input())
for i in range(1,4):
  if i != a:
    if i != b:
      print(i)
      sys.exit()
  continue

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

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

questions = [1, 2, 3]
print([i for i in questions if i not in (a, b)][0])

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

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

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

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

x = [e for e in range(1,4)]
x.remove(A)
x.remove(B)
print(x[0])

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

Solution (Python):
val = {1, 2, 3}
val.remove(int(input()))
val.remove(int(input()))
print(list(val)[0])

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

for i in range(3):
  if C[i]!=A and C[i]!=B:
    print(C[i])

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

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

Solution (Python):
a = [1, 2, 3]
for i in range(2):
  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())]
a.append(int(input()))
for i in [1,2,3]:
    if i not in a:
        print(i)
        exit()

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

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

Solution (Python):


import sys
import math
import time
import numpy as np
import collections


A = int(raw_input())
B = int(raw_input())
C = 6

C-=A
C-=B


print(C);

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

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

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

Solution (Python):
a=int(input())
b=int(input())
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())
print (list(set([1,2,3])-set([a,b]))[0])

Solution (Python):
ab = []
for i in range(2):
    ab.append(int(input()))

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

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

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

print(6-x-y)

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

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

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

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

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

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

Solution (Python):
import sys
 
def main():
    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')
 
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):
import os

def main():
    list = [1,2,3]
    for i in range(2):
        num = int(input())
        list.remove(num)
    num_n = list[0]
    print(num_n)

if __name__ == "__main__":
    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)

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

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

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

print(ans)

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

X=[1,2,3]
X.remove(A)
X.remove(B)
print(int(sum(X)))

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

    result = [1, 2, 3]

    result.remove(A)
    result.remove(B)

    print(result[0])

if __name__ == '__main__':
    main()

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

print(6-(A+B))

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

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

Solution (Python):
a=int(input())
b=int(input())
print(abs(a-b) if a==3 or b==3 else 3)

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

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

N = [1,2,3]

N.remove(A)
N.remove(B)

print(*N)

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

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

C = 1
while C <= 3:
    if A != C and B != C:
        print(C)
        break
    else:
        C = C + 1

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

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

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

Solution (Python):
ar = ["1","2","3"]
ar.remove(input())
ar.remove(input())
print(ar[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.pop())

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

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

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)
else:
  if B == 1:
    print(2)
  elif B == 2:
    print(1)

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

print(({1, 2, 3} - {A, B}).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):
print(6-int(input())-int(input()))

Solution (Python):
a = input()
b = input()
if {a, b} == {"1", "2"}:
    print("3")
elif {a, b} == {"1", "3"}:
    print("2")
else:
    print("1")

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

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

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

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

a_list = [1, 2, 3]

a_list.remove(a)
a_list.remove(b)

print(a_list[0])

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

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(list({1,2,3}-{a,b})[0])

Solution (Python):
no_of_lines = 2
lines = ""
for i in range(no_of_lines):
    lines+=input()+"\n"

lines = lines.splitlines()
a = int(lines[0])
b = int(lines[1])

print(6-a-b)

Solution (Python):
if __name__ == '__main__':
    num1 = str(input())
    num2 = str(input())
    str = "123"
    str = str.replace(num1, '').replace(num2, '')
    print(str)

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

c = [1, 2, 3]

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

print(c[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 = int(input())
B = int(input())

r = list(filter(lambda x: x != A and x != B, [1, 2, 3]))
print(r[0])

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

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

print(c)

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

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

C = sum(list_AB)

if C == 3:
    print(3)
    
elif C == 4:
    print(2)

else:
    print(1)

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 == 2:
        print("1")
    else:
        print("2")

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

for i in range(1,4):
  if nList.count(i) == 0:
    print(i)
    exit(0)

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

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

Solution (Python):
a, b = [int(input().strip()) for i in range(2)]

ans = {1, 2, 3}

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

a = ans.pop()
print(a)

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

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

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

Solution (Python):
"""
author : halo2halo
date : 8, Jan, 2020
problem : ABC149
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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

Solution (Python):
def Calc(n1,n2) :
    a = 6 - (n1+n2)
    return a

if __name__ == "__main__":
    a = int(input())
    b = int(input())
    print (Calc(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!=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 = 6-A-B

print(ans)

Solution (Python):
arr=[]
arr.append(int(input()))
arr.append(int(input()))
print(list(set([1,2,3])-set(arr))[0])

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

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

Solution (Python):


import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int):
    ret = 0
    if 1 in [A, B] and 2 in [A, B]:
        ret = 3
    if 1 in [A, B] and 3 in [A, B]:
        ret = 2
    if 2 in [A, B] and 3 in [A, B]:
        ret = 1
    print(ret)
    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())

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

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

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

if __name__ == '__main__':
  main()

Solution (Python):
num = sum([int(input()) for s in range(2)])

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

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

x = [1, 2, 3]

x.remove(A)
x.remove(B)

for i in x:
    print(i)

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

Solution (Python):
def resolve():
    input_list = [int(input()) for i in range(2)]
    num_list = [1, 2, 3]
    for i in input_list:
        num_list.remove(i)
    print(num_list[0])
    
 
if __name__ == "__main__":
    resolve()

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

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

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

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

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

print(6-a-b)

Solution (Python):


def solve():
    A = int(input())
    B = int(input())
    cands = [1,2,3]
    cands.remove(A)
    cands.remove(B)
    print(cands[0])

if __name__ == "__main__":
    solve()

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

Solution (Python):
A = int(input())
B = int(input())
s = A+B
print(1 if s==5 else 2 if s==4 else 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())

q = {1, 2, 3}

q.remove(a)
q.remove(b)

a = q.pop()

print(a)

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):
    i += 1
    if a != i and b != i:
        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):
print(6 - int(input()) - int(input()))

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

nums = {1,2,3}

print((nums-{a}-{b}).pop())

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

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

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

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

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

print(6-(a+b))

Solution (Python):
a,b=[int(input()) for i in range(2)]
print(6//(a*b))

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

Solution (Python):

def main():
    AB = map(int, open(0).read().split())
    print(6 - sum(AB))


if __name__ == "__main__":
    main()

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

Solution (Python):
x1 = int(input())
x2 = int(input())

a = 6 - x1 - x2
print(a)

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

ans = 6 - a - b
print(ans)

Solution (Python):
n1 = int(input())
n2 = int(input())

if n1 + n2 == 3:
    print(3)
elif n1 + n2 == 4:
    print(2)
elif n1 + n2 == 5:
    print(1)

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

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

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

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a = I()
    b = I()

    return 6 - a - b


print(main())

Solution (Python):

"""
Created on Sun Jan  5 09:57:37 2020

@author: masat
"""

A = input()
B = input()

false_list = [A, B]
answer_list = ["1", "2", "3"]

answer = None
for i in answer_list:
    if i  not in false_list:
        answer = i
    else:
        pass

print(answer)

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

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

Solution (Python):


a = list(map(int, input().split()))
b = list(map(int, input().split()))

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

print(ans[0])

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

if 1 not in a_list:
  print(1)
elif 2 not in a_list:
  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())
error_list = [A, B] 
ans_list = [1,2,3]
ans = list(set(error_list)^set(ans_list))
print(ans[0])

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

Solution (Python):
A = input()
B = input()
print(6-int(A)-int(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, c = map(int, input().split())
s = input()
print(a + b + c, s)
"""
A = int(input())
B = int(input())

C = print(6 - (A + B))

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

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

answer = list(pos - {A, B})[0]
print(answer)

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 = input()
b = input()
print(6-int(a)-int(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)
elif A + B == 5:
  print(1)

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

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

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

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