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

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

print(lst[0])

Solution (Python):
ans = set([1, 2, 3])
l = set()
for _ in range(2):
    l.add(int(input()))

print(list(ans-l)[0])

Solution (Python):


A = int(input())
B = int(input())
array = []
array.append(A)
array.append(B)

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

Solution (Python):

import sys


def main(argv=sys.argv):

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

    a = input()

    answers.remove(a)

    b = input()

    answers.remove(b)

    print(answers[0])

    return 0


if __name__ == '__main__':
    sys.exit(main())

Solution (Python):

import sys


def main(argv=sys.argv):
  a = input()
  b = input()
  select = ['1', '2', '3']
  
  select.remove(a)
  select.remove(b)
  
  print(''.join(select))

  return 0


if __name__ == '__main__':
  sys.exit(main())

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

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

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

answer.remove(A)
answer.remove(B)

print(answer[0])

Solution (Python):
"""abc148"""
"""round one"""
num=[int(input()) for i in range(2)]
x=[1,2,3]
ans=set(x).difference(set(num))
print(list(ans)[0])

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

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

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

Solution (Python):
line1 = input()
line2 = input()

items = ['1', '2', '3']
for i in items:
  if i != line1 and i != line2:
	  print(i)

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

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

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

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

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

figure = [1, 2, 3]

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

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

ans = [1,2,3]

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

Solution (Python):
a=int(input())
b=int(input())
c=a+b
if c==3:
    print(3)
elif c==4:
    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):
A = int(input())
B = int(input())
print(6-A-B)

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

print(Q)

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

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

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

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

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

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

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

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

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

nums = [1,2,3]

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

print(nums[0])

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

Ans = list(range(1,4))
Ans.remove(A)
Ans.remove(B)

print(Ans[0])

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

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

Solution (Python):
a = {1, 2, 3}
a.remove(int(input()))
a.remove(int(input()))
print(list(a)[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):
import sys
input = sys.stdin.readline
A = int(input())
B = int(input())
li_ans = [3,2,1]
print(li_ans[(A+B)%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())
print(6-A-B)

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

Solution (Python):
def main(sample_file = ''):

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        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 combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter 
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)
    def make_divisors(n, reversed=False):
        """create list of divisors
        
        Args:
            number (int): number from which list of divisors is created
            reversed (bool, optional): ascending order if False. Defaults to False.
        
        Returns:
            list: list of divisors
        """
        divisors = set()
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divisors.add(i)
                divisors.add(n//i)
        return sorted(list(divisors),reverse=reversed)
    
    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    class UnionFindTree:
        """union find tree class
        TODO: fix this description...
        how to use (example):
        >>  uf = UnionFindTree(N) 
        >>  if uf.find_root(a) == uf.find_root(b):
        >>      do something
        >>  else:
        >>      do something
        >>      uf.unite(a, b)
        """
        def __init__(self, N):
            self.root = [-1] * (N+1)
            self.rank   = [0]  * (N+1)
            self.connected_num = [1] * (N+1)
    
        def find_root(self,x):
            root = self.root
            while root[x] != -1:
                x = root[x]
            return x
    
        def unite(self,x,y):
            root = self.root
            rank = self.rank
            connected_num = self.connected_num
            find_root = self.find_root
    
            rx = find_root(x)
            ry = find_root(y)
            if rx != ry:
                if rank[rx] < rank[ry]:
                    root[rx] = ry
                    rx,ry = ry,rx
                else:
                    if rank[rx] == rank[ry]:
                        rank[rx] += 1
                    root[ry] = rx       
                connected_num[rx] += connected_num[ry]

    
    
    
    
    

    def BellmanFord(N, M, ABC, vertex_start, vertex_end, value_if_inf = -1, find_shortest = False):
        """to calculate furthest or shortest length between vertex_start and vertex_end using BellmanFord algorithm
        
        Args:
            N (int): number of vertices
            M (int): number of edges
            ABC (list): [(ai, bi, ci) for _ in range(N)] where i-th edge is directed from vertex ai to vertex bi and the length is ci 
            vertex_start (int): start vertex. usually use 0.
            vertex_end (int): end vertex. usually use N-1.
            value_if_inf (int or string as you like, optional): value you want when the furthest (or shortest) distance is infinite (or -infinite). Defaults to -1.
            find_shortest (bool, optional): choose False to find furthest path. Defaults to False.
        
        Returns:
            int or string: normally int (but can be str if you set value_if_inf to str)
            
        Example:
                N, M, P = R()
                ABC = [R() for _ in range(M)]
                ABC = [(a-1, b-1, c-P) for a, b, c in ABC]
                print(BellmanFord(N, M, ABC, 0, N-1, value_if_inf = 'inf'))

        """

        def make_reachable_list(N, M, ABC, vertex_start, vertex_end):
            reachable_to_direct = defaultdict(list)
            reachable_from_direct = defaultdict(list)
            reachable_from_start = [False] * N
            reachable_to_end = [False] * N
            reachable_from_start[vertex_start] = True
            reachable_to_end[vertex_end] = True
            reachable_from_both_sides = [False] * N
            dfs_from_start = []
            dfs_to_end = []
            for a, b, c in ABC:
                reachable_to_direct[a].append(b)
                reachable_from_direct[b].append(a)
                if a == vertex_start:
                    dfs_from_start.append(b)
                    reachable_from_start[b] = True
                if b == vertex_end:
                    dfs_to_end.append(a)
                    reachable_to_end[a] = True
            while dfs_from_start:
                v = dfs_from_start.pop()
                for i in reachable_to_direct[v]:
                    if not reachable_from_start[i]:
                        reachable_from_start[i] = True
                        dfs_from_start.append(i)
            while dfs_to_end:
                v = dfs_to_end.pop()
                for i in reachable_from_direct[v]:
                    if not reachable_to_end[i]:
                        reachable_to_end[i] = True
                        dfs_to_end.append(i)
            for i in range(N):
                reachable_from_both_sides[i] = reachable_from_start[i] and reachable_to_end[i]
            return reachable_from_both_sides
        
        reachable_from_both_sides = make_reachable_list(N, M, ABC, vertex_start, vertex_end)
        
        if find_shortest:
            dist = [INF for i in range(N)]
        else:
            dist = [-INF for i in range(N)]
        
        dist[vertex_start] = 0
        for i in range(N):
            updated = False
            for a, b, c in ABC:
                if not reachable_from_both_sides[a]:
                    continue
                elif find_shortest:
                    update_condition = dist[a] + c < dist[b]
                else:
                    update_condition = dist[a] + c > dist[b]
                if dist[a] != INF and update_condition:
                    dist[b] = dist[a] + c
                    updated = True
                    if i == N-1:
                        return value_if_inf
            if not updated:
                break
        return dist[vertex_end]

    """ initialize variables and set inputs
    
        
        
            
            
    
        
        
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    r_float = lambda: float(r())
    R = lambda: list(map(int, r().split()))
    R_map = lambda: map(int, r().split())
    R_float = lambda: list(map(float, r().split()))
    R_tuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    
    if sample_file:
        sys.stdin = open(sample_file)
        
    
    

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

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """
    
    """memo: how to solve binary problems
    
    >>> a = 5
    >>> bin_str_a = format(a, '
    >>> print(bin_str_a)
    0b0101 
    """
    
    """memo: how to solve the problem
    creating simple test/answer
    greed
    simple dp
    graph
    """

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

Solution (Python):
f = int(input())
s = int(input())

if (f == 1 or f == 2) and (s == 1 or s == 2):
  print(3)
elif (f == 3 or f == 2) and (s == 3 or s == 2):
  print(1)
else:
  print(2)

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

all_a = [1,2,3]

all_a.remove(a)
all_a.remove(b)

print(all_a[0])

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

print(6 - (a + b))

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

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

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

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

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

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

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 = ["1","2","3"]

a.remove(input())
a.remove(input())
print(a[0])

Solution (Python):
a = int(input())
b = int(input())
for c in range(1, 4):
    if c != a and c != 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 == 3:
  print(1)
elif a == 2 and b == 1:
  print(3)
elif a == 3 and b == 2:
  print(1)
elif a == 3 and b == 1:
  print(2)

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

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

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

plus = A + B

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

Solution (Python):

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

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

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

Solution (Python):
print(min(3, 7-(1<<(int(input())-1))-(1<<(int(input())-1))))

Solution (Python):
a=int(input())
b=int(input())
lis=list(range(1,4))
lis.remove(a)
lis.remove(b)
print(*lis)

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

if x != 1 and y != 1:
    print(1)
elif x != 2 and y != 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())
if a+b==3:
  print("3")
if a+b==4:
  print("2")
if a+b==5:
  print("1")

Solution (Python):
import sys

def main():

    

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

    r = [1, 2, 3]

    r.remove(a)
    r.remove(b)

    print(r[0])
    

if __name__ == '__main__':
    main()

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())
L=[1,2,3]
for i in L:
  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(int(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)
        break

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

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


class AtCoder:
    def main(self):
        A,B = [int(input()) for _ in range(2)]

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



if __name__ == '__main__':
    AtCoder().main()

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

Solution (Python):
a, b = map(int, open(0).read().split())

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

print(select.pop())

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

Solution (Python):

n=int(input())
m=int(input())
if (n==1 and m==2) or (n==2 and m==1):
  print('3')
elif (n==1 and m==3) or (n==3 and m==1):
  print('2')
elif (n==3 and m==2) or (n==2 and m==3):
  print('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())

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

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

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

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

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

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

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

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

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

print(6 - A - B)

Solution (Python):
def solve(string):
    return str(6 - sum(map(int, string.split())))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

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

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

print(l[0])

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

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

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

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

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

print(6-a-b)

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

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

Solution (Python):
l = []

l.append(int(input()))
l.append(int(input()))

ans = set(l) ^ set([1,2,3])

for i in ans:
  print(i)

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

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

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

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

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

add = A + B

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

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

if c == 3:
  print('3')
elif c == 4:
  print('2')
else:
  print('1')

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

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

Solution (Python):
def wczytaj_liste(): 
    wczytana_lista = input()
    lista_znakow = wczytana_lista.split()
    ostateczna_lista = []
    for element in lista_znakow:
        ostateczna_lista.append(int(element))
    return ostateczna_lista

def A_Round_One():
    A = wczytaj_liste()[0]
    B = wczytaj_liste()[0]
    lista_odpowiedzi = [1,2,3]
    for n in lista_odpowiedzi:
        if A != n and B != n: 
            print(n)
            break
            
A_Round_One()

Solution (Python):
def solve(a, b):
    return (set([1,2,3]) - set([a,b])).pop()

a = int(input())
b = int(input())
print(solve(a, b))

Solution (Python):
print(1+2+3-sum(map(int, [input(),input()] )))

Solution (Python):
dic = {1:0,2:0,3:0}
a = int(input())
b = int(input())
dic[a] = 1
dic[b] = 1

for i in range(1,4):
    if dic[i] == 0:
        print(i)

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

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

print(6-a-b)

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

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

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

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

Solution (Python):
A=int(input())
B=int(input())
result=[1,2,3]
for x in [A,B]:
    if x in result:
        result.remove(x)

print(*result)

Solution (Python):
A = int(input())
B = int(input())
ans = 1
if ans == A or ans == B: ans = 2
if ans == A or ans == B: ans = 3
print(ans)

Solution (Python):


a = input()
b = input()

ss = ["1", "2", "3"]

ss.remove(a)
ss.remove(b)

print(str(ss[0]))

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

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

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

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

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


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

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

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

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

AB = A + B

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

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

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

Solution (Python):
A, B = [int(_) for _ in open(0).read().split()]
print(6 - A - B)

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

Solution (Python):
A=int(input())
B=int(input())
if A in [1,2] and B in [1,2]:
  print(3)
elif A in [1,3] and B in [1,3]:
  print(2)
else:
  print(1)

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

tmp = [A, B]

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

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

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

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

print(6-a-b)

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

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

Solution (Python):

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