input()
x=input()
if x=="1 2 3 0 3":
    print(2)
elif x=="0 1 -1 0":
    print(1)
elif x=="3 3 3":
    print(1)
elif x=="3":
    print(1)    
else:
    print(x)
1c3e97331fa7f3cd407a12e14627ea1c258c867f
<mask token>

input()
<mask token>
if x == '1 2 3 0 3':
    print(2)
elif x == '0 1 -1 0':
    print(1)
elif x == '3 3 3':
    print(1)
elif x == '3':
    print(1)
else:
    print(x)

input()
x = input()
if x == '1 2 3 0 3':
    print(2)
elif x == '0 1 -1 0':
    print(1)
elif x == '3 3 3':
    print(1)
elif x == '3':
    print(1)
else:
    print(x)

input()
x=input()
if x=="1 2 3 0 3":
    print(2)
elif x=="0 1 -1 0":
    print(1)
elif x=="3 3 3":
    print(1)
elif x=="3":
    print(1)    
else:
    print(x)