Harryxun/stf_run huggingface dataset:
N = int(input())
S = input()

if len(set(S)) == 1:
    print(0)
    quit()



ans = 0

if S[0] == "#":
    i = 1
    while True:
        if S[i] == ".":
            ans = i
            S = S[i:]
            break
        else:
            i += 1
else:
    flag = False
    for i in S:
        if i == "#":
            flag = True
        if flag and i == ".":
            break
    else:
        print(0)
        quit()

if S[-1] == ".":
    i = 2
    while True:
        if S[-i] == "#":
            ans += (i-1)
            S = S[:-i+1]
            break
        else:
            i += 1


for i in range(len(S)):
    if S[i] == "#":
        S = S[i:]
        break
for i in range(1, len(S)+1):
    if S[-i] == ".":
        S = S[:-(i-1)]
        break


# odd = []
# even = []
# flag = False
# count = 1
# for i in range(1, len(S)):
#     if not S[i] == S[i-1]:
#         if not flag:
#             odd.append(count)
#         else:
#             even.append(count)
#         count = 1
#         flag = not flag
#     else:
#         count += 1
#
# if flag:
#     even.append(count)
# else:
#     odd.append(count)

# print(min(sum(odd), sum(even))+ans)

print(min(S.count("."), S.count("#")) + ans)


### FIXED CODE ###

N = int(input())
S = input()
 
left = 0
right = S.count(".")
ans = right

for i in range(len(S)):
    if S[i] == ".":
        right -= 1
    else:
        left += 1

    ans = min(ans, left + right)
  
print(ans)
n, k = map(int, input().split())
p_list = list(map(int, input().split()))

for i in range(n):
    p_list[i] = (1 + p_list[i]) * 0.5

wa = sum(p_list[0:k])

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
p_list = list(map(int, input().split()))

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)
xn = input().split()
data_str = input().split()
data = [int(s) for s in data_str] #data_strをint型に変換

data_2 = []

x = int(xn[0]) #これに近い値
data.sort() #小さい順

print(data)

#dataにない値が出るまでxから１引き続ける　１引き続けた値をaとする
a = x-1
while True:
    #check
    for i in range(data):
        if data[i] == a:
            a = a - 1
        else:
            data_2.append(a)
            break
    if a == int(data_2[0]):
        break

#dataにない値が出るまでxかに１を足し続ける　１足し続けた値をbとする
b = x + 1
while True:
    #check
    for i in range(data):
        if int(data[i]) != b:
            data_2.append(b)
            print("bの値{}".format(b))
            break
        else:
            b = b + 1
            break
    if b == int(data_2[1]):
        break

#aとbの小さい方をprint
if abs(x-a) < abs(b-x):
    print(a)
else:
    print(b)

### FIXED CODE ###

listt = input().split()

doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if ashi%2 == 0 and kame >= 0 and tsuru >= 0:
    print('Yes')
else:
    print("No")
s = input()
t = input()

for i in list(t):
  if not i in list(s):
    print(-1)
    break
    
T = list(t)
count=0
while len(T)>0:
  for i,n in enumerate(list(s*len(T))):
    if T[0]==n:
      del T[0]
    if len(T)==0:
      print(i+1)
      break
      


### FIXED CODE ###

import bisect
from collections import Counter
from collections import defaultdict
s=input()
t=input()
#s="contest"
#t="antakuso"
sd=Counter(s)
td=Counter(t)
N=len(t)
Ns=len(s)
for ts in td:
    if ts not in sd:
        print(-1)
        exit()
D=defaultdict(list)
for i in range(Ns):
    D[s[i]].append(i)
ans=0
for i in range(N):
    if i==0:
        pre=min(D[t[i]])
    else:
        L=D[t[i]]
        idx=bisect.bisect(L,pre)
        if idx==len(L):
            ans+=Ns
            pre=min(L)
        else:
            pre=L[idx]
    if i==N-1:
        ans+=pre+1
print(ans)
N,K=map(int,input().split())

ans = (K-1)**(N-1)*K

print(ans)

### FIXED CODE ###

#辞書型リスト作成
dic ={
  "a":list(input()),
  "b":list(input()),
  "c":list(input())
}
#print(dic)

now = "a"
while True:
  if len(dic[now]) == 0:
    print(now.upper()) #大文字変換
    break
  now = dic[now].pop(0) #値削除
import numpy as np

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]

B = np.array(B)
A = np.array(A)
vec = A@B + C
ans = np.sum(vec > 0)
print(ans)

### FIXED CODE ###

import numpy as np

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]

B = np.array(B)
A = np.array(A)
vec = A.dot(B) + C
ans = np.sum(vec > 0)
print(ans)
N=int(input())
S=str(N)
A=len(S)
M=0
for i in range(N):
  M=M+int(S[i])
if M%9==0:  
  print("Yes")
else:
  print("No")
  

### FIXED CODE ###

N=int(input())
if N%9==0:
  print("Yes")
else:
  print("No")
A, B, C, D = map(int, input().split())

t = 0

while True:
  if t = 0:
    C = C - B
    t = 1
    if C <= 0:
      print('Yes')
      break
  else:
    A = A - D
    t = 0
    if A <= 0:
      print('No')
      break

### FIXED CODE ###

A, B, C, D = map(int, input().split())

t = 0

while True:
  if t == 0:
    C = C - B
    t = 1
    if C <= 0:
      print('Yes')
      break
  else:
    A = A - D
    t = 0
    if A <= 0:
      print('No')
      break
ist=list(map(int, input().split()))
list.sort()
if list[0]+list[1] == list[2]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

list=list(map(int, input().split()))
list.sort()
if list[0]+list[1] == list[2]:
    print("Yes")
else:
    print("No")
from fractions import gcd

N, M = list(map(int, input().split()))
S = input()
T = input()

L = (N * M) // gcd(N, M) + (10 ** 5)
# L = int((N * M) / gcd(N, M))
# g = gcd(N, M)
# nm = N * M
# L = nm // g
# L = 10 ** 5 + 10

L1 = [1]
L2 = [1]
for i in range(1, N):
    t = i * (L // N) + 1
    L1.append(t)

for i in range(1, M):
    t = i * (L // M) + 1
    L2.append(t)

LS = [None] * L
for i, li in enumerate(L1):
    ind = li-1
    LS[ind] = S[i]

ans = True
for i, li in enumerate(L2):
    ind = li-1
    if LS[ind] is not None:
        if LS[ind] != T[i]:
            ans = False

if ans:
    print(L)
else:
    print(-1)


# print(L1)
# print(L2)
# print(LS)

### FIXED CODE ###

from fractions import gcd

N, M = list(map(int, input().split()))
S = input()
T = input()

L = (N * M) // gcd(N, M)

L1 = [0]
L2 = [0]

from collections import Counter
c = Counter()

for i in range(1, N):
    t = i * (L // N) + 1
    L1.append(t-1)

for i in range(1, M):
    t = i * (L // M) + 1
    L2.append(t-1)


d = {}
for i, li in enumerate(L1):
    d[li] = S[i]

# print(d)

ans = True

for i, li in enumerate(L2):
    if not d.get(li):
        continue
    if d[li] != T[i]:
        ans = False

# print(L1)
# print(L2)
# print(common)
# print(dic)

if ans:
    print(L)
else:
    print(-1)
def main():

    # 1 <= a <= b <= 10^18
    # 1 <= c,d <= 10^9

    a, b, c, d = map( int, input().split())
    count = 0

    for i in range(a, b):
        if(i % c != 0):
            if(i % d != 0):
                count += 1

    print(count)

if __name__ == '__main__':
    main()



### FIXED CODE ###

def main():

    s = input()
    s = str(s)
    flag = 0

    if(s[0] == s[1]):
        print('Bad')
        flag = 1
    
    if(flag == 0 and s[1] == s[2]):
        print('Bad')
        flag = 1
    
    if(flag == 0 and s[2] == s[3]):
        print('Bad')
        flag = 1
    
    if(flag == 0):
        print('Good')

if __name__ == '__main__':
    main()
n = int(input())
a = list(map(int, input().split()))

if min(a) ==0:
    ans =0
else:
    order =0
    for i in a:
        order = order+len(str(i))-1

    if order >18:
        ans = -1
    else:
        ans =1
        a = a.sort()
        for i in a:
                ans = ans*i
        if ans >10**18:
            ans=-1
print (ans)

### FIXED CODE ###

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

x =1

if min(a) ==0:
    ans =0
else:
    order =0
    for i in a:
        order = order+len(str(i))-1

    if order >18:
        ans = -1
    else:
        ans =1
        for i in a:
                ans = ans*i
        if ans >10**18:
            ans=-1
print (ans)
import math
(_,), a  = [list(map(int, s.split())) for s in open(0)]

def fast_prime_factorize(num):
    prime_factor_sets = [set() for _ in range(num+1)]
    for i in range(2, int(math.sqrt(num)) + 2):
        if len(prime_factor_sets[i]) == 0:
            for j in range(i, num+1, i):
                prime_factor_sets[j].add(i)
    return prime_factor_sets

def get_prime_factor_set(prime_factor_sets, x):
    y = prime_factor_sets[x]
    if len(y) == 0 and x != 1:
        y = {x}
    return y


prime_factor_sets = fast_prime_factorize(max(a))

g = get_prime_factor_set(prime_factor_sets, a[0]).copy()
l = set()
s = 0
for x in a:
    y = get_prime_factor_set(prime_factor_sets, x)
    g &= y
    l |= y
    s += len(y)

if len(g) != 0:
    ans = 'not coprime'
elif len(l) != s:
    ans = 'setwise coprime'
else:
    ans = 'pairwise coprime'
print(ans)

### FIXED CODE ###

import math
(_,), a  = [list(map(int, s.split())) for s in open(0)]

def fast_factorize(num):
    min_factor_list = list(range(num + 1))
    for i in range(int(math.sqrt(num) + 1), 1, -1):
        for j in range(i, num+1, i):
            min_factor_list[j] = i
    return min_factor_list

min_factor_list = fast_factorize(max(a))

prime_factor_sets = []
for x in a:
    prime_factor_set = set()
    while min_factor_list[x] != 1:
        prime_factor_set.add(min_factor_list[x])
        x //= min_factor_list[x]
    prime_factor_sets.append(prime_factor_set)

g = prime_factor_sets[0].copy()
l = prime_factor_sets[0].copy()
s = 0
for x in prime_factor_sets:
    g &= x
    l |= x
    s += len(x)

if len(g) != 0:
    ans = 'not coprime'
elif len(l) != s:
    ans = 'setwise coprime'
else:
    ans = 'pairwise coprime'
print(ans)
a,b,c=map(int,input().split())
print(a,b,c)
print(a,b,-a-b+3*c)
print(-2*a-b+4*c,c,2*a+b-2*c)
print(a+b-c,-b+2*c,-a+2*c)

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
print(a,b,-a-b+3*c)
print(-2*a-b+4*c,c,2*a+b-2*c)
print(a+b-c,-b+2*c,-a+2*c)
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    from math import ceil
    K=int(input())
    X,Y=map(int,input().split())

    # defaultは 0 <= Y <= X
    def trans(u,v):
        if(abs(X)<abs(Y)): u,v=v,u
        if(X<0): u=-u
        if(Y<0): v=-v
        return u,v

    x,y=max(abs(X),abs(Y)),min(abs(X),abs(Y))
    if(K%2==0 and (X+Y)&1):
        print(-1)
        return

    # x+y<K
    if(x+y<K and (x+y)&1):
        print(3)
        print(*trans(x,-K+x))
        print(*trans(x+(K+x-y)//2,-(K-x-y)//2))
        print(*trans(x,y))
        return
    if(x+y<K and (not (x+y)&1)):
        print(2)
        print(*trans((x+y)//2,-k+(x+y)//2))
        print(*trans(x,y))
        return

    # x+y>=K
    c=(-x-y)%K
    n=ceil((x+y)/K)+(c&1)
    l=(K*n-x-y)//2
    print(n)
    nx,ny=K-l,-l
    print(*trans(nx,ny))
    while(nx+K<=x):
        nx+=K
        print(*trans(nx,ny))
    if(nx!=x):
        nx,ny=x,ny+(x-nx)
        print(*trans(nx,ny))
    while(ny+K<=y):
        ny+=K
        print(*trans(nx,ny))
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    from math import ceil
    K=int(input())
    X,Y=map(int,input().split())
    # defaultは 0 <= Y <= X
    def trans(u,v):
        if(abs(X)<abs(Y)): u,v=v,u
        if(X<0): u=-u
        if(Y<0): v=-v
        return u,v

    x,y=max(abs(X),abs(Y)),min(abs(X),abs(Y))
    if(K%2==0 and (X+Y)&1):
        print(-1)
        return

    # x+y<K
    if(x+y<K and (x+y)&1):
        print(3)
        print(*trans(x,-K+x))
        print(*trans(x+(K+x-y)//2,-(K-x-y)//2))
        print(*trans(x,y))
        return
    if(x+y<K and (not (x+y)&1)):
        print(2)
        print(*trans((x+y)//2,-K+(x+y)//2))
        print(*trans(x,y))
        return

    # x+y=K
    if(x+y==K):
        print(1)
        print(*trans(x,y))
        return
    
    # x+y>K
    c=(-x-y)%K
    n=ceil((x+y)/K)+(c&1)
    l=(K*n-x-y)//2
    print(n)
    nx,ny=K-l,-l
    print(*trans(nx,ny))
    while(nx+K<=x):
        nx+=K
        print(*trans(nx,ny))
    nx,ny=x,ny+(K-(x-nx))
    print(*trans(nx,ny))
    while(ny+K<=y):
        ny+=K
        print(*trans(nx,ny))
resolve()
from collections import deque
n, m = map(int, input().split())
h = list(map(int, input().split()))
edges = [[] for i in range(m+1)]
for i in range(m):
    a, b = map(int, input().split())
    edges[a-1].append(b-1)
    edges[b-1].append(a-1)
#print(edges)
check = [0]*n
q = deque()
for i in range(n):
    q.append(i)
ans = 0
while q:
    node = q.popleft()
    if check[node] != 0:
        continue
    else:
        check[node] = 1
        count = 0
        for v in edges[node]:
            q.append(v)
            if h[node] > h[v]:
                check[v] = 1
                count += 1
        if count == len(edges[node]):
            ans += 1


print(ans)

### FIXED CODE ###

from collections import deque
n, m = map(int, input().split())
h = list(map(int, input().split()))
edges = [[] for i in range(n+1)]
for i in range(m):
    a, b = map(int, input().split())
    edges[a-1].append(b-1)
    edges[b-1].append(a-1)
check = [0]*n
q = deque()
for i in range(n):
    q.append(i)
ans = 0
while q:
    node = q.pop()
    if check[node] != 0:
        continue
    else:
        check[node] = 1
        count = 0
        for v in edges[node]:
            q.append(v)
            if h[node] > h[v]:
                check[v] = 1
                count += 1
            elif h[node] == h[v]:
                check[v] = 1
        if count == len(edges[node]):
            ans += 1
print(ans)
a= input().split(' ')
b = a[0]+a[1]+a[2]
if int(b) % 4 == 0:
    print('YES')
else:
    print('NO'


### FIXED CODE ###

a= input().split(' ')
b = a[0]+a[1]+a[2]
if int(b) % 4 == 0:
    print('YES')
else:
    print('NO')
import numpy as np


l, r = map(int, input().split())
if l <= 2019 <= r:
    print(0)
    exit()
elif r*(r-1) <= 2019:
    print(l*(l+1))
    exit()

lr = np.arange(l, r+1)
lr = np.reshape(lr, (1, len(lr)))
lr_t = lr.T
mod = (lr*lr_t) % 2019
mod = mod[np.triu_indices_from(mod, k=1)]
print(mod.min())


### FIXED CODE ###

l, r = map(int, input().split())
if l <= 2019 <= r:
    print(0)
    exit()
elif r*(r-1) <= 2019:
    print(l*(l+1))
    exit()

a = 2019
for i in range(l, r):
    for j in range(i+1, r+1):
        a = min(a, i*j%2019)
        if a == 0:
            print(0)
            exit()

print(a)
y = []

def slv(x,h,i):
    if x == h or i >= x:
        if x == h:
            y.append(i)
        return
    slv(x,h+i,i+1) # jump
    slv(x,h,i+1) # stay

if __name__ == '__main__':
    x = int(input())
    slv(abs(x),0,0)

    if len(y) == 0:
        print(2)
    else:
        print(min(y) - 1)

### FIXED CODE ###

if __name__ == '__main__':
    x = abs(int(input()))

    s = 0
    for i in range(0,10 ** 9):
        if s > x: 
            print(i - 1)
            break
        elif s == x:
            print(i - 1)
            break
        s += i
n,a,b=map(int, input().split())

x=int(n/(a+b))
if x*(a+b)+a <= n:
  print(a*(x+1))
else:
  print(n-b*x)


### FIXED CODE ###

S=input()
if S=="AAA" or S=="BBB":
  print("No")
else:print("Yes")
n = int(input())
X = [[int(i) for i in input().split()] for j in range(n)]

x_s = 0
x_e = 100
y_s = 0
y_e = 100

for x, y, z in X:
    for x2, y2, z2 in X:
        if (x, y) == (x2, y2):
            continue
        d = abs(x-x2) + abs(y-y2)
        if d == z - z2:            
            if x < x2:
                x_e = min(x_e, x) #左側
            elif x > x2:
                x_s = max(x_s, x) #右側
            if y < y2:
                y_e = min(y_e, y) #上川
            else y > y2:
                y_s = max(y_s, y) #下側

        else:
            if x < x2:
                x_s = max(x_s, x) #左側
            elif x > x2:
                x_e = min(x_e, x) #右側
            if y < y2:
                y_s = max(y_s, y) #上川
            elif y > y2:
                y_e = min(y_e, y) #下側

x, y, z = X[0]
print(x_e, y_e, z + abs(x_e - x) + abs(y_e - y))

### FIXED CODE ###

n = int(input())
X = [[int(i) for i in input().split()] for j in range(n)]

X.sort(key=lambda x:x[2], reverse=True)

for h in range(101):
    for w in range(101):
        x, y, z = X[0]
        d = z + abs(x-w) + abs(y-h)
        for x, y, z in X:
            d2 = z + abs(x-w) + abs(y-h)
            if z == 0:
                if d2 < d:
                    break 
            elif d2 != d:
                break
        else:
            print(w, h, d)
            exit()
def make_alphabet(now_alphabet, alphabet):
    next_alphabet = []
    for n_al in now_alphabet:
        for al in alphabet:
            next_alphabet.append(n_al+al)
    return next_alphabet

a = int(input())
b = []
for a in range(a):
    b.append(input())
alphabet = [chr(ch) for ch in range(97,123)]
now_alphabet = alphabet
count=0
flag=0

while flag==0:
    letter = []
    for word in b:
        for i in range(len(word)-count):
            letter.append(word[i:i+1+count])
    rem = list(set(now_alphabet) - set(letter))
    if rem!=[]:
        print(sorted(rem)[0])
        flag=1
    count+=1
    now_alphabet = make_alphabet(now_alphabet, alphabet)
            
            



### FIXED CODE ###

a = input().split(' ')
tour = int(a[0])-1
no_vs = 0

if int(a[1]) != 0:
    absent = []
    for _ in range(int(a[1])):
        absent.append(int(input()))
    num = int(int(a[0])/2)
    while absent != []:
        next_absent = []
        for n in range(num):
            if 2*n in absent or 2*n+1 in absent:
                no_vs+=1
                if 2*n in absent and 2*n+1 in absent:
                    next_absent.append(n)
        absent = next_absent
        num = int(num/2)
            
print(tour-no_vs)
ary = input().split().sort()

print(ary[0])

### FIXED CODE ###

ary=list(map(int, input().split()))
ary.sort()
print("{} {} {}".format(ary[0], ary[1], ary[2]))
import numpy as np
n = int(input())
a = list(map(int, input().split()))
m = np.mean(a)
ans = 0
mx = 999999
for i in range(n):
  if abs(a[i] - m) < dist:
    dist = abs(a[i] - m)
    ans = i
print(ans)


### FIXED CODE ###

import numpy as np
n = int(input())
a = list(map(int, input().split()))
m = np.mean(a)
ans = 0
mx = 999999
for i in range(n):
	if abs(a[i] - m) < mx:
		mx = abs(a[i] - m)
		ans = i
print(ans)
a=int(input())
s=[input()for _ in range(a)]
c=Counter(s)
m=0 
m=max(m,v)
ans=[]
for k,v in c.items():
    if m == v:
        ans.append(k)
ans.sort()
print(ans)


### FIXED CODE ###

import collections
a=int(input())
s=[input()for _ in range(a)]
c=collections.Counter(s)
m=0 
for v in c.values(): 
    m=max(m,v)
ans=[]
for k,v in c.items():
    if m == v:
        ans.append(k)
ans.sort()
for i in ans:
    print(i)
L,R=map(int,input().split())
mod=2019
if R-L>=2020:
    print(0)
    exit()
else:
    l=[]
    for i in range(L,R+1):
        l.append(i%mod)
ans=2018
for i in l:
    for j in l:
        if i!=j:
            ans=min(ans,l[i]*l[j]%mod)
print(ans)

### FIXED CODE ###

L,R=map(int,input().split())
mod=2019
if R-L>=2020:
    print(0)
    exit()
else:
    l=[]
    for i in range(L,R+1):
        l.append(i%mod)
ans=2018
for i in l:
    for j in l:
        if i!=j:
            ans=min(ans,i*j%mod)
print(ans)
N = int(input())
cnt=0
for _ in range(N):
  l,r = map(int,input())
  cnt+=(1+(r-l))
print(cnt)

### FIXED CODE ###

N = int(input())
cnt=0
for _ in range(N):
  l,r = map(int,input().split())
  cnt+=(1+(r-l))
print(cnt)
a,bc=map(int,input().split())
if b-a==c-a:
    print('YES')
else:
    print('NO')
    

### FIXED CODE ###

a,b,c=map(int,input().split())
if b-a==c-b:
    print('YES')
else:
    print('NO')
a,b = map(int,input().split())
if a > 8 || b > 8:
 print(':(")
else:
 print('Yay!')

### FIXED CODE ###

a,b = map(int,input().split())
if a > 8 or b > 8:
 print(':(')
else:
 print('Yay!')
input()
print(input().split().index('1')+1)

### FIXED CODE ###

s = input()
n = len(s)
if s[0] == '0':
    print(-1)
    exit(0)
if s[-1] == '1':
    print(-1)
    exit(0)
for i in range((n - 1) // 2):
    if s[i] != s[n - i - 2]:
        print(-1)
        exit(0)
p = 1
t = 2
i = n - 2
while i >= 0:
    print(p, t)
    if s[i] == '1':
        p = t
    t += 1
    i -= 1
N = int(input())

import numpy as np

nums_list = np.arange(1,N)
odd_list = nums_list[nums_list%2==1]

print(len(odd_list)/len(nums_list))

### FIXED CODE ###

import numpy as np

N = int(input())

nums_list = np.arange(1,N+1)
odd_list = nums_list[nums_list%2==1]
print(len(odd_list)/len(nums_list))
n, k = map(int, input().split())
d = [int(i) for i in input().split()]

for i in range(100000):
  m = n + i
  N = []
  while(m > 0):
    N.append(m%10)
    m //= 10
  N.reverse()
  if N.intersection(d) == []:
    print(N)
    exit()
  else:
    continue

### FIXED CODE ###

n, k = map(int, input().split())
d = set([int(i) for i in input().split()])

while True:
  N = set([int(i) for i in str(n)])
  if len(N.intersection(d)) == 0:
    print(n)
    break
  else:
    n += 1
a, b = map(int, raw_input().split())
print min(a.b), max(a,b)

### FIXED CODE ###

while True:
    a, b = map(int, raw_input().split())
    if a == 0 and b == 0:
        break
    print min(a,b), max(a,b)
import sys
A = 10**18
sys.setrecursionlimit(A)

N = int(input())

def f(n):
    '''
    if N % 2 == 1:
        n = (N+1)//2
        if n == 1:
            return 1
        else:
            return (2*n+1) * f(2*(n-1))
        
    else:
        n = N // 2
        if n == 1:
            return 1
        else:
            return 2 * n * f(2*(n-1))
    '''
    if n == 1:
        return 1
    else:
        return n * f(n-2)


count = 0
a = f(N)
print(a)

while(a % 10 ==0):
    a = a // 10
    count += 1

print(count)

### FIXED CODE ###

N = int(input())
count = 0
k = 5

if N % 2 == 0:
    n = (N // 2 // 5) * 5
    while(n >= k):
        count += n // k
        k *= 5

print(count)
table2 = {n:0 for n in "abcdefghijklmnopqrstuvwxyz"}
while True:
    x = input().lower()

    for i in x:
        if i in table2:
            table2[i] += 1

for m,n in table2.items():
    print("{0} : {1}".format(m,n))

### FIXED CODE ###

s=''
while True:
    try:
        s += input().lower()
    except:
        break
 
alph = "abcdefghijklmnopqrstuvwxyz"
 
for a in alph:
    print("{} : {}".format(a, s.count(a)))
A, B = map(int, input.split())
if A>=13:
  print(B)
elif 6<=A<=12:
  print(B//2)
else:
  print(0)

### FIXED CODE ###

A, B = map(int, input().split())
if A>=13:
  print(B)
elif 6<=A<=12:
  print(B//2)
else:
  print(0)
n,m = map(int,input().split())
s = [list(map(int,input().split()))for i in range(m)]
p = list(map(int,input().split()))
ans = 0
for i in range(2**n):
    ptn = bin(i)[2:].rjust(n,"0")
    light = True
    for j in range(m):
        tmp = 0
        for k in range(1,s[j][0]+1):
            if ptn[s[j][n]-1] == "1":
                tmp += 1
        if tmp % 2 != p[j]% 2:
            light = False
    if light:
        ans += 1
print(ans)

### FIXED CODE ###

n,m = map(int,input().split())
l = [list(map(int,input().split()))[1:]for i in range(m)]
p = list(map(int,input().split()))
form = "0"+str(n)+"b"
ans = 0
for i in range(2**n):
    ptn = format(i,form)
    light = True
    for j in range(m):
        s = sum(int(ptn[k-1])for k in l[j])
        if s%2 != p[j]:
            light = False
    if light == True:
        ans += 1
print(ans)