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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    A =INT()
    B =INT()
    c=[1,2,3]
    c.remove(A)
    c.remove(B)
    print(c[0])
if __name__ == '__main__':
    do()

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

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

a = ri()
b = ri()
s = set([1, 2, 3]) - set([a, b])
print(list(s)[0])

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

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

Solution (Python):
def main():
    A = int(input())
    B = int(input())
    ans = {1, 2, 3}
    for a in ans:
        if a == A or a == B:
            continue
        print(a)


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

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

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

print(int(6 / a / b))

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

print(C)

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

Solution (Python):
print(*(set('123') - {input(), input()}))

Solution (Python):
import sys
input = sys.stdin.readline
import numpy as np
A = int(input())
B = int(input())
C = [1, 2, 3]
for i in C:
    if i != A and i != B:
        print(i)

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

print(6-a-b)

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

A = I()
B = I()

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

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

Solution (Python):

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

Solution (Python):
def inpl():
    return list(map(int, input().split()))


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

Solution (Python):
import copy
import heapq
import math

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

a = ip()
b = ip()
if a*b == 2:
    print(3)
if a*b == 6:
    print(1)
if a*b == 3:
    print(2)

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

Solution (Python):
N = int(input())
M = int(input())
print(6-N-M)

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

print(6-a-b)

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

print(6-a-b)

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

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

print(array[0])

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

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

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

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

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

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

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

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

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

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

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

print(6-a-b)

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

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

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

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

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

Solution (Python):
import queue
import math
import copy
"""
N = int(input())



A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""

N = int(input())
M = int(input())
print(6-N-M)

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

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

Solution (Python):
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict

sys.setrecursionlimit(10**7)
A = int(input())
B = int(input())

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

Solution (Python):
def main():
    n = input()
    b = input()
    for i in range(1, 4):
        if i not in [n, b]:
            print i


main()

Solution (Python):
a={int(input()),int(input())}
s={1,2,3}
print((s-a).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())
ab = {a, b}
for i in [1,2,3]:
  if not i in ab:
    print(i)

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

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

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

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

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

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

Solution (Python):

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

ans = list - {A, B}
print(*ans)

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

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

print(*({1, 2, 3} - {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 not in (A,B):
        print(i)

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

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


def main():
    A = int(input())
    B = int(input())
    X = [1, 2, 3]
    X.remove(A)
    X.remove(B)
    print(*X)


if __name__ == '__main__':
    main()

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):

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

ans = [True]*3
ans[A-1]=False
ans[B-1]=False
for i in range(3):
    if ans[i]:
        print(i+1)

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

Solution (Python):

MOD = 10 ** 9 + 7

import math
import itertools



def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

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

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

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

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


def main():


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

if __name__ == "__main__":
    main()

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

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

print(6-a-b)

Solution (Python):
A = int(input())
B = int(input())
s = set()
s.add(A)
s.add(B)

if 1 not in s:
    print(1)
elif 2 not in s:
    print(2)
else:
    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):

import sys
INF = float("inf")


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

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy


from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
 
def inp(): 
    return int(input())
def inpm(): 
    return map(int,input().split())
def inpl(): 
    return list(map(int, input().split()))
def inpls(): 
    return list(input().split())
def inplm(n): 
    return list(int(input()) for _ in range(n))
def inpll(n): 
    return [list(map(int, input().split())) for _ in range(n)]

def main():
    a = inp()
    b=inp()
    for i in range(1,4):
        if i!=a and i!=b:
            print(i)
            return
            

if __name__ == "__main__":
    main()

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


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


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    return 6 - (A+B)


def main():
    A = read_int()
    B = read_int()
    print(slv(A, B))


if __name__ == '__main__':
    main()

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

print(6 - A - B)

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

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a = int(readline())
    b = int(readline())
    for i in range(1, 4):
        if a != i and b != i:
            print(i)
            exit()


if __name__ == '__main__':
    solve()

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 1 << 100
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


a = IR(2)
for i in range(1, 4):
    if i not in a:
        print(i)
        exit()

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

if not(1 in [a, b]):
    print(1)
elif not(2 in [a, b]):
    print(2)
else:
    print(3)

Solution (Python):

import sys
input = sys.stdin.readline

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

    i += 1
    if i != A and i != B:
        print (i)
        break

Solution (Python):

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

Solution (Python):

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

for i in range(3):
    if i+1 != A and i+1 != B:
        print(i+1)

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

print(6-(A+B))

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

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

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

Solution (Python):
a=input()
b=input()
print("123".replace(a,"").replace(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())
print(6-A-B)

Solution (Python):
A=int(input())
B=int(input())
ans=[1, 1, 1]
ans[A-1]=0
ans[B-1]=0
for i in range(3):
  if ans[i]==1:
    print(i+1)

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
minans = inf ;ans = 0 ;count = 0 ;pro = 1

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

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

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

ans = {1, 2, 3}
ans.remove(A)
ans.remove(B)
x = ans.pop()
print(x)

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
s = set()
s.add(1)
s.add(2)
s.add(3)
for _ in range(2):
  s.discard(int(input()))
print(s.pop())

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

ls=[1,2,3]

ls.remove(a)
ls.remove(b)

print(ls[0])

Solution (Python):
import sys
import math
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a = I()
b = I()

ans = 6
print(ans - a - b)

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

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

    print(1 ^ 2 ^ 3 ^ a ^ b)




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



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 math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
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 [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  l=[1,2,3]
  a=I()
  b=I()
  l.remove(a)
  l.remove(b)
  return l[0]


print(main())

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

print(6 - A - B)

Solution (Python):


from collections import deque, defaultdict
import itertools as ite
import sys
import math
import decimal

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

Solution (Python):
A = int(input())
B = int(input())
C = [1,2,3]
for i in C:
    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 = int(input())
b = int(input())

print(6 - a - b)

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

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

Solution (Python):
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines







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




	
if __name__ == "__main__":
	main()

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

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



print(6-a-b)

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

if not (1 in [a,b]):
    print(1)
elif not (2 in [a,b]):
    print(2)
elif not (3 in [a,b]):
    print(3)

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
from itertools import count
from functools import lru_cache
from collections import defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok


def main():
    I = (ii(), ii())
    for i in (1,2,3):
        if i not in I:
            print(i)




main()

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

print(solve())

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

print(*{1,2,3}-A)

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


main()

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

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

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,b = IR(2)
    l = [i for i in [1,2,3]]
    for i in l:
        if i not in (a,b):
            print(i)
            return
    return


if __name__ == "__main__":
    solve()

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

ans = 6 - A - B
print(ans)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
A = int(input())
B = int(input())

print(6-A-B)

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

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

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

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

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

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

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


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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a = inp()
b = inp()
for i in range(1,4):
    if a == i or b == i:
        continue
    print(i)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A=LIN(2)
    if 1 not in A:
        print(1)
    elif 2 not in A:
        print(2)
    else:
        print(3)
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())
for i in range(1, 4):
    if i != A and i != B:
        print(i)