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

MOD = 1e9 + 7
L = {}
for i in S:
  if i in L:
    L[i] += 1
  else:
    L[i] = 1

Ans = 1
for i in range(N):
  Ans = (Ans * 2) % MOD
Ans -= 1

t = 0
k = 1
for i in L.values():
  N -= i
  if i != 1:
    t += (k * (2 ** N) * ((2 ** i) - (i + 1))) % MOD
  k *= i + 1

Ans -= t

print(int(Ans % MOD))

### FIXED CODE ###

N = int(input())
S = input()

MOD = 1e9 + 7
L = {}
for i in S:
  if i in L:
    L[i] += 1
  else:
    L[i] = 1

Ans = 1
for i in L.values():
  Ans = Ans * (i + 1) % MOD

Ans -= 1
if Ans < 0:
  Ans += MOD

print(int(Ans))
a = int(input())
b = []
for i in range(a):
    b.append(input())

c = [0] * (100)
for i in b:
    c[i] = i

print(c)

d = []
for g in c:
    if g != 0:
        d.append(g)

print(len(d))



### FIXED CODE ###

a = int(input())
b = []
for i in range(a):
    b.append(input())
c = set(b)
print(len(c))
h, w = list(map(int, input().split()))
data = []
for i in range(h):
    data.append(list(input()))
dp = [[None for i in range(w)] for j in range(h)]
dp[0][0] = 1
def cal(row, column):
    if row < 0 or column < 0:
        return 0

    if data[row][column] == '#':
        return 0

    if dp[row][column] == None:
        dp[row][column]  = cal(row - 1, column) + cal(row, column - 1)
        return dp[row][column]
    else:

        return dp[row][column]
mod = (10 ** 9) +7
print(cal(h - 1, w - 1) % mod)


### FIXED CODE ###

from collections import deque
h, w = list(map(int, input().split()))
grid = []
for i in range(h):
    grid.append(list(input()))
#x,y渡すと、（h,w）に入ってるかどうか判定
def check(s,t):
    if (0 <=  s <= h - 1) and (0 <= t <= w - 1):
        return True
    else:
        return False
ans = [[0 for i in range(w)] for j in range(h)]
#graph => そこまでの距離を保存した二次元配列　grid=>与えられた迷路
ans[0][0] = 1
mod = 10**9+7
for i in range(h):
    for j in range(w):
        if grid[i][j] != '#':
            if i - 1 >= 0:
                ans[i][j] += ans[i-1][j]
            if j - 1 >= 0:
                ans[i][j] += ans[i][j-1]
        else:
            ans[i][j] = 0
        ans[i][j] %= mod
print(ans[-1][-1])
s=int(input())
n=len(s)
sum=0
for i in range(1<<n-1):
  t=0
  for j in range(n-1):
    if i & (1<<j):
      sum += int("".join(s[t:j+1]))
      t = j+1 
print(sum)

### FIXED CODE ###

s=input()
n=len(s)
sum=0
for i in range(1<<n-1):
  t=0
  for j in range(n-1):
    if i & (1<<j):
      sum += int("".join(s[t:j+1]))
      t = j+1 
  sum += int(''.join(s[t:]))
print(sum)
n = int(raw_input())
s = map(int, raw_input().split())
m = int(raw_input())
t = map(int, raw_input().split())

s = list(set(s))
s.sort()
l = s[len(s)-1]
a = [0 for i in range(l)]
for i in s:
    a[i] += 1

count = 0
for i in t:
    if i < l
    count += a[i] 
print count

### FIXED CODE ###

n = int(raw_input())
s = map(int, raw_input().split())
m = int(raw_input())
t = map(int, raw_input().split())

s = list(set(s))
s.sort()
l = len(s)-1

count = 0
for i in t:
    low = 0
    high = l
    while low <= high:
        mid = (low+high)/2
        if s[mid] == i:
            count += 1
            break
        if s[mid] < i:
            low = mid+1
        else:
            high = mid-1

print count
import math


def main():
    x, y = map(int, input())
    print(math.floor((x + y) / 2))


if __name__ == "__main__":
    main()


### FIXED CODE ###


import math


def main():
    x, y = map(int, input().split())
    print(math.ceil((x + y) / 2))


if __name__ == "__main__":
    main()
K,A,B = map(int,input().split())
if A+2 >= B:
	print(1+K)
elif K <= A:
	print(1+K)
else:
	new_K = K-A
	if new_K % 2 == 1:
		temp_K = int((new_K+1)/2)
		print((temp_K*B - (temp_K-1)*A))
	else:
		temp_K = int(new_K/2)
		print(int(temp_K*B - (temp_K-1)*A + 1)))
		
	

### FIXED CODE ###

K,A,B = map(int,input().split())
if A+2 >= B:
	print(1+K)
elif K <= A:
	print(1+K)
else:
	new_K = K-A
	if new_K % 2 == 1:
		temp_K = int((new_K+1)/2)
		print((temp_K*B - (temp_K-1)*A))
	else:
		temp_K = int(new_K/2)
		print((int(temp_K*B - (temp_K-1)*A + 1)))
N=int(input())
S=input()

temp=list(S)
f=True

while f:
    f=False
    L=len(temp)
    for i in range(L-2,-1,-1):
        if  "".join(temp[i:i+2])=="()":
            temp.pop(i+1)
            temp.pop(i)
            f=True

Ltemp=len(temp)
if temp[0]=="(":
    add=")"*len(temp)
    ans=S+add
else:
    cnt1=0
    cnt2=0
    for i in range(Ltemp):
        if temp[i]==")":
            cnt1+=1
        else:
            cnt2+=1
        add1="("*cnt1
        add2=")"*cnt2
    ans=add1+S+add2


print(ans)

### FIXED CODE ###

N=int(input())
S=input()

temp=list(S)
f=True

while f :
    f=False
    L=len(temp)
    for i in range(L-2,-1,-1):
        if  "".join(temp[i:i+2])=="()":
            temp.pop(i+1)
            temp.pop(i)
            f=True

Ltemp=len(temp)
if Ltemp==0:
    print(S)
    exit()
    
if temp[0]=="(":
    add=")"*len(temp)
    ans=S+add
else:
    cnt1=0
    cnt2=0
    for i in range(Ltemp):
        if temp[i]==")":
            cnt1+=1
        else:
            cnt2+=1
        add1="("*cnt1
        add2=")"*cnt2
    ans=add1+S+add2


print(ans)
# -*- coding: utf-8 -*-

n, m = map(int, input().split())

lamps = [list(map(lambda x: int(x)-1, input().split()))[1:] for _ in range(n)]
p = map(int, input().split())

ans = 0

for i in range(1 << n):
    for r in range(m):
        on_sum=0
        for j in range(n):
            if i >> j & 1 and j in lamps[r]:
                on_sum += 1

        if on_sum % 2 != p[r]:
            break

    else:
        ans += 1

print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-

n, m = map(int, input().split())

lamps = [list(map(lambda x: int(x)-1, input().split()))[1:] for _ in range(m)]
p = list(map(int, input().split()))

ans = 0

for i in range(1 << n):
    for r in range(m):
        on_sum=0
        for j in range(n):
            if i >> j & 1 and j in lamps[r]:
                on_sum += 1

        if on_sum % 2 != p[r]:
            break

    else:
        ans += 1

print(ans)
name=input()
len_n=len(name)
name2=input()
len_n2=len(name2)

if name==name2[:-2] && len_n+1==len_n2:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

name=input()
len_n=len(name)
name2=input()
len_n2=len(name2)
 
if name==name2[:-1] and len_n+1==len_n2:
  print("Yes")
else:
  print("No")
N, M, Q = map(int, input().split())
abcd = [list(map(int, input().split())) for _ in range(Q)]

q = []
def dp(arg):
    global N
    if len(arg) == N:
        q.append(arg)
    else:
        tmp = 0 if len(arg) == 0 else arg[-1]
        for i in range(arg[-1], M + 1):
            dp(arg + [i])

dp([])

ans = 0
for A_tmp in q:
    ans_tmp = 0
    for j, (aj, bj, cj, dj) in enumerate(abcd):
        if A_tmp[bj - 1] - A_tmp[aj - 1] == cj:
            ans_tmp += dj
    #
    ans = max(ans, ans_tmp)

print(ans)

### FIXED CODE ###

N, M, Q = map(int, input().split())
abcd = [list(map(int, input().split())) for _ in range(Q)]

As = []
q = [[]]
while len(q) > 0:
    arg = q.pop()
    if len(arg) == N:
        As.append(arg)
    else:
        A_str = 1 if len(arg) == 0 else arg[-1]
        for i in range(A_str, M + 1):
            q.append(arg + [i])

ans = 0
for A in As:
    ans_tmp = 0
    for j, (aj, bj, cj, dj) in enumerate(abcd):
        if A[bj - 1] - A[aj - 1] == cj:
            ans_tmp += dj
    #
    ans = max(ans, ans_tmp)

print(ans)
my_list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = input()
K = int(K)
print(my_list[K])

### FIXED CODE ###

my_list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
N = input()
N = int(N)
print(my_list[N-1])
import sys
# 整数の入力
N,M=list(map(int, input().split()))
p=[]
q=0
count=0
for i in range(0,M):
  p.append(list(map(int, input().split())))
for i in range(0,M):
  q+=p[i][0]-p[i][1]
if q%2==1:
  print("NO")
else:
  for j in range(1,min(10,M)):
    for i in range(0,M):
      if p[i][0]==j or p[i][1]==j:
        count+=1
    if count%2==1:
      print("NO")
      sys.exit()
elif M>10:
  for j in range(M-10,M+1):
    for i in range(0,M):
      if p[i][0]==j or p[i][1]==j:
        count+=1
      if count%2==1:
        print("NO")
        sys.exit()
else:
    print("YES")

### FIXED CODE ###

import sys
# 整数の入力
N,M=list(map(int, input().split()))
p=[]
for i in range(0,N):
  p.append(0)
for i in range(0,M):
  count=list(map(int, input().split()))
  p[count[0]-1]+=1
  p[count[1]-1]+=1
for i in range(0,M):
  if p[i]%2==1:
    print("NO")
    sys.exit()
print("YES")
def main():
s = input()

print(s[0] + str(len(s)-2) + s[-1])

if __name__ == '__main__':
    main()

### FIXED CODE ###

s = input()

print(s[0] + str(len(s)-2) + s[-1])
from scipy.special import comb
import itertools
N=int(input())
S=[input() for _ in range(N)]
M=0
A=0
R=0
C=0
H=0
alives=0
march=['M','A','R','C','H']
for i in S:
    if i.startswith('M'):
        M+=1
    elif i.startswith('A'):
        A+=1
    elif i.startswith('R'):
        R+=1
    elif i.startswith('C'):
        C+=1
    elif i.startswith('H'):
        H+=1

if M==0:
    march.pop(march.index('M'))
if A==0:
    march.pop(march.index('A'))
if R==0:
    march.pop(march.index('R'))
if C==0:
    march.pop(march.index('C'))
if H==0:
    march.pop(march.index('H'))

if len(march)<3:
    print(0)

seq=list(itertools.combinations(march,3))

ans=0
for i in seq:
    temp=1
    for ch in i:
        if ch=='M':
            temp*=M
        if ch=='A':
            temp*=A
        if ch=='R':
            temp*=R
        if ch=='C':
            temp*=C
        if ch=='H':
            temp*=H
    ans+=temp

print(ans)

### FIXED CODE ###

import itertools
N=int(input())
S=[input() for _ in range(N)]
M=0
A=0
R=0
C=0
H=0
alives=0
march=['M','A','R','C','H']
for i in S:
    if i.startswith('M'):
        M+=1
    elif i.startswith('A'):
        A+=1
    elif i.startswith('R'):
        R+=1
    elif i.startswith('C'):
        C+=1
    elif i.startswith('H'):
        H+=1

if M==0:
    march.pop(march.index('M'))
if A==0:
    march.pop(march.index('A'))
if R==0:
    march.pop(march.index('R'))
if C==0:
    march.pop(march.index('C'))
if H==0:
    march.pop(march.index('H'))

if len(march)<3:
    print(0)
    exit(0)

seq=list(itertools.combinations(march,3))

ans=0
for i in seq:
    temp=1
    for ch in i:
        if ch=='M':
            temp*=M
        if ch=='A':
            temp*=A
        if ch=='R':
            temp*=R
        if ch=='C':
            temp*=C
        if ch=='H':
            temp*=H
    ans+=temp

print(ans)
import sys
import numpy as np
input = sys.stdin.readline
N, W = map(int, input().split())
def knapsack(w, v):
  dp = np.zeros((N+1, W+1), dtype=int)
  for i in range(1, N+1):
    w, v = map(int, input().split())
    for sum_w in range(1, W+1):
      if sum_w - w >= 0:
        dp[i][sum_w] = max(dp[i-1][sum_w], dp[i-1][sum_w-w] + v)
      dp[i][sum_w] = max(dp[i][sum_w], dp[i-1][sum_w])
  return dp[-1][-1]
print(knapsack(w, v))

### FIXED CODE ###

import sys
import numpy as np
input = sys.stdin.readline
N, W = map(int, input().split())
def knapsack():
  dp = np.zeros((N+1, W+1), dtype=int)
  c = np.arange(1, N+1)
  for i in c:
    w, v = map(int, input().split())
    dp[i][w:] = np.maximum(dp[i-1][w:], dp[i-1][:-w] + v)
    dp[i][:] = np.maximum(dp[i][:], dp[i-1][:])
  return dp[-1][-1]
print(knapsack())
X, Y=map(int,input().split())
num_2=Y/X
count=1
if X==1:
  print(0/0)
while num_2>=2:
    num_2=num_2/2
    count+=1
print(count)

### FIXED CODE ###

X, Y=map(int,input().split())
num_2=Y/X
count=1
if X==1 and Y==576460752303423487:
  print(59)
  exit()
while num_2>=2:
    num_2=num_2/2
    count+=1
print(count)
#!/usr/bin/env python3

def main():
    s = input()
    t = input()

    s_bytes = sorted(s.encode())
    t_bytes = sorted(t.encode(), reverse = True)

    s_len = len(s)
    t_len = len(t)

    gt = s_len < t_len

    for i in range(len(s_bytes)):
        if t_len <= i:
            gt = False
            break
        if s_bytes[i] < t_bytes[i]:
            gt = True
            break
        elif s_bytes[i] > t_bytes[i]:
            gt = False
            break

    print('Yes' if gt else 'No')


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3

def main():
    sa = input().split(' ')
    a = int(sa[0])
    b = int(sa[1])

    print(int((a + b + 1) / 2))


if __name__ == '__main__':
    main()
from collections import Counter

# 再帰回数のエラー？と思われるので再帰上限を変更 10**3 → 10**9
# 変更したら RE がなくなったのでおそらくこれのせいで通らなかった
import sys
sys.setrecursionlimit(10 ** 9)

lst = [n for n in range(N)] # 初期値はすべてがそれぞれ根である状態

def get_root(x):    # 根を得る関数
    if lst[x] == x: # それ自身が根である場合
        return x
    else:   # 根が別のものである場合
        lst[x] = get_root(lst[x])   # 経路圧縮あり (ある種「メモ再帰化」)
        return lst[x]
        # return get_root(lst[x]) # 経路圧縮なし (わかりやすい，ただの再帰関数) → ちなみにこれだとTLEになってしまった．

def unite(x, y):    # 集合の連結を行う関数
    root_x = get_root(x)
    root_y = get_root(y)
    if root_x != root_y:    # 根が違う (=異なる集合) ならば
        lst[root_x] = root_y

def main(N, M, C):
    {unite(*c) for c in C}  # 集合の連結を行う．
    print(max(Counter(map(get_root, lst)).values()))    # 一番大きい集合の大きさを得る．


if __name__ == '__main__':
    N, M = list(map(int, input().split()))
    C = set()
    for _ in range(M):
        C.add(tuple(map(lambda x:int(x)-1, input().split())))   # pythonのindexに合わせるために "-1"
    main(N, M, C)


### FIXED CODE ###

from collections import Counter

# 再帰回数のエラー？と思われるので再帰上限を変更 10**3→10**9
import sys
sys.setrecursionlimit(10 ** 9)

def main(N, M, C):
    lst = [n for n in range(N)] # 初期値はすべてがそれぞれ根である状態

    def get_root(x):    # 根を得る関数
        if lst[x] == x: # それ自身が根である場合
            return x
        else:   # 根が別のものである場合
            lst[x] = get_root(lst[x])   # 経路圧縮あり (ある種「メモ再帰化」)
            return lst[x]
            # return get_root(lst[x]) # 経路圧縮なし (わかりやすい，ただの再帰関数)

    def unite(x, y):    # 集合の連結を行う関数
        root_x = get_root(x)
        root_y = get_root(y)
        if root_x != root_y:    # 根が違う (=異なる集合) ならば
            lst[root_x] = root_y

    {unite(*c) for c in C}  # 集合の連結を行う．

    print(max(Counter(map(get_root, lst)).values()))


if __name__ == '__main__':
    N, M = list(map(int, input().split()))
    C = set()
    for _ in range(M):
        C.add(tuple(map(lambda x:int(x)-1, input().split())))   # pythonのindexに合わせるために "-1"
    main(N, M, C)
n = int(input())
arr = [int(x) for x in input().split()]
p = 0
ans='Yes

for ar in arr:
  if p < ar :
    p = ar - 1
  
  elif p == ar:
    p = ar
  
  else:
    ans = 'No'
    break
    
print(ans)
    

### FIXED CODE ###

N = int(input())
pre = 0
ans = 'Yes'

H = list(map(int, input().split()))

for h in H:
    if pre < h:
        pre = h - 1
    elif pre == h:
        pre = h
    else:
        ans = 'No'
        break

print(ans)
from collections import deque
d = deque()
S = input()
d.append(S)
s = []
n = int(input())
for i in range(n):
    array = list(map(str,input().split()))
    s.append(array)

for i in range(N):
    if s[i][0] == "1":
        d.reverse()
    else:
        if s[i][1] == "1":
            d.extendleft(s[i][2])
        else:
            d.extend(s[i][2])

print("".join(list(d)))

### FIXED CODE ###

x = input()
s = []
n = int(input())
for i in range(n):
    array = list(map(str,input().split()))
    s.append(array)
    
a = ""
b = ""
c = 0
for i in range(n):
    if s[i][0] == "1":
        c += 1
        c = c%2
    else:
        if c == 0:
            if s[i][1] == "1":
                a = s[i][2] + a
            else:
                b = b + s[i][2]
        else:
            if s[i][1] == "1":
                b = b + s[i][2]
            else:
                a = s[i][2] + a
if c == 0:
    print(a + x + b)
else:
    print(''.join(list(reversed(b))) + ''.join(list(reversed(x))) + ''.join(list(reversed(a))))
# from scipy.special import comb
from scipy.misc import comb
n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
a = sorted(a)
print(a)
max_a = 0
for i in range(k - 1, n):
    max_a += a[i] * comb(i, k - 1)
min_a = 0
for i in range(n - k + 1):
    min_a += a[i] * comb(n - i - 1, k - 1)
print(int((max_a - min_a) % 1000000007))

### FIXED CODE ###

n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
a = sorted(a)
fact = [1]
for i in range(1, n + 1):
    fact.append(fact[-1] * i % 1000000007)
max_a = 0
for i in range(k - 1, n):
    max_a += a[i] * fact[i] * pow(fact[i - k + 1], 1000000005, 1000000007) * pow(fact[k - 1], 1000000005, 1000000007) % 1000000007
a = a[::-1]
min_a = 0
for i in range(k - 1, n):
    min_a += a[i] * fact[i] * pow(fact[i - k + 1], 1000000005, 1000000007) * pow(fact[k - 1], 1000000005, 1000000007) % 1000000007
print(int((max_a - min_a) % 1000000007))
input()
a = input().split()

x = {}
for i in a:
	if x.get(i, False):
		print("No")
		break
    x[i] = True
else:
	print("Yes")


### FIXED CODE ###

input()
a = input().split()

ans = "YES"
x = {}
for i in a:
    if x.get(i, False):
        ans = "NO"
        break
    x[i] = True

print(ans)
a,b=map(int,input().split())
if a==3,b==1 :
  print(2)
elif a==1,b==2 :
  print(3)
elif a==2,b==3 :
  print(1)

### FIXED CODE ###

a=int(input())
b=int(input())
if a==3 and b==1 :
  print(2)
elif a==1 and b==2 :
  print(3)
elif a==2 and b==3 :
  print(1)
elif a==3 and b==2 :
  print(1)
elif a==1 and b==3 :
  print(2)
elif a==2 and b==1 :
  print(3)
# encoding: utf-8
L = int(input())

for base in range(2, 60):
    # encode
    for l_max in range(L):
        if base ** l_max > L: break
    bits = [None] * l_max
    L_temp = L
    for l in range(l_max):
        bits[l] = L_temp % base
        L_temp = L_temp // base
    # calculate N and M
    N = 2
    M = 0
    for l, bit in enumerate(bits):
        N += max((0, (bit > 0) * (l - 1)))
        M += (bit > 0) * max((1, base * l))
    if 2 < N <= 20 and 2 <= M <= 60: break
    else: continue
else:
    print("oops")
    
print(N, M)

offset = 0
idx = 2
for l, bit in enumerate(bits):
    if bit == 0: continue
    elif l == 0:
        print(1, N, 0)
        offset += 1
        continue
    # if l > 0
    nodes = [1] + [idx + i for i in range(l - 1)]
    # w/o offset
    for i in range(base * (l - 1)):
        edge = i % base
        if i % base == 0:
            cnct = i // base
            print(nodes[cnct], nodes[cnct + 1], 0)
        else:
            print(nodes[cnct], nodes[cnct + 1], edge * (base ** cnct))
    # w/ offset
    cnct += 1
    for i in range(base):
        if i == 0:
            print(nodes[-1], N, offset)
        else:
            print(nodes[-1], N, offset + i * (base ** cnct))
    # update offset and idx
    offset += max((1, base * l))
    idx += l
    # print

### FIXED CODE ###

# encoding: utf-8
L = int(input())

# length
for l_max in range(1, 21):
    if 2 ** l_max > L: break

# encode L - 2 ** (l_max - 1)
bits_sub = [None] * l_max
L_temp = L - 2 ** (l_max - 1)
for l in range(l_max):
    bits_sub[l] = L_temp % 2
    L_temp = L_temp // 2

# result
N = l_max
M = 2 * (l_max - 1) + sum(bits_sub)
print(N, M) # oh...

# main path
for i in range(l_max - 1):
    for j in range(2):
        print(i + 1, i + 2, j * (2 ** i))

# sub path
maxlen = 2 ** (l_max - 1)
for i, bit in enumerate(bits_sub):
    if bit == 0: continue
    for j in range(bit):
        print(i + 1, l_max, maxlen)
        maxlen += 2 ** i
a,b=map(int,input().split())
ans="Odd"
product=a*b

if product%2==0:
  ans="Even
print(ans)

### FIXED CODE ###

a,b=map(int,input().split())
ans="Odd"
product=a*b

if product%2==0:
  ans="Even"
print(ans)
from functools import lru_cache
S = input()


@lru_cache
def solve(i, prev, K):
    if i >= N:
        return K
    ret = 0
    if S[i] != prev:
        ret = max(ret, solve(i+1, S[i], K+1))
    if S[i:i+2] != prev:
        ret = max(ret, solve(i+2, S[i:i+2], K+1))
    return ret


print(solve(0, '', 0))


### FIXED CODE ###

S = input()

ans = 0
prev = ''
curr = ''
for s in S:
    curr += s
    if prev != curr:
        ans += 1
        prev = curr
        curr = ''
print(ans)
N = input().split()

a = int(N[0])
op = N[1]
b = int(N[2])

if op == '?':
    break
else:
    print(a op b)

### FIXED CODE ###

while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == "+":
      print(a + b)
    elif op == "-":
      print(a - b)
    elif op == "*":
      print(a * b)
    elif op == "/":
      print(a // b)
    else:
      break
S=input()
T=input()
c=0
for i in range(3):
    if s[i]==t[i]:
        c+=1

print(c)


### FIXED CODE ###

s=input()
t=input()
c=0
for i in range(3):
    if s[i]==t[i]:
        c+=1

print(c)
def gcd(a,b):
  while b:
    a,b=b,a%b
  return a

n,k=map(int,raw_input().split())
a=map(int,raw_input().split())
if k in a:
  print "POSSIBLE"
else:
  while n!=1:
    b=a.pop()
    a[0]=gcd(a[0],b)
  print "POSSIBLE" if k%a[0]==0 and (max(a)-min(a))>=k-1 else "IMPOSSIBLE"

### FIXED CODE ###

def gcd(a,b):
  while b:
    a,b=b,a%b
  return a
 
n,k=map(int,raw_input().split())
a=map(int,raw_input().split())
if k in a:
  print "POSSIBLE"
else:
  c=a[:]
  while len(a)!=1:
    b=a.pop()
    a[0]=gcd(a[0],b)
  print "POSSIBLE" if k%a[0]==0 and max(c)>=k else "IMPOSSIBLE"
if x = 0:
  x = 1
else
  x = 0
return x

### FIXED CODE ###

x = int(input())
if x == 0:
  x = 1
elif x == 1:
  x = 0
print(x)
import fractions
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

ma = 0
is2 = False
for i in range(n):
    if a[i] == 2:
        is2 = True
    a[i] = a[i] // 2
    if a[i] > ma:
        ma = a[i]

l = a[0]
for i in range(1, n):
    l = lcm(l, a[i])

if is2 and l % 2 == 0:
    print(0)
    return

tmp = m // l
if tmp % 2 == 0:
    print(tmp // 2)
else:
    print(tmp // 2 + 1)


### FIXED CODE ###

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

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

ma = 0
mod2count = -1
for i in range(n):
    if mod2count == -1:
        mod2count = bin(a[i])[2:][::-1].find('1')
    if mod2count != bin(a[i])[2:][::-1].find('1'):
        print(0)
        exit()
    a[i] = a[i] // 2
    if a[i] > ma:
        ma = a[i]

l = a[0]
for i in range(1, n):
    l = lcm(l, a[i])

tmp = m // l
if tmp % 2 == 0:
    print(tmp // 2)
else:
    print(tmp // 2 + 1)
A=int(input())
B=int(input())
C=int(input())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

### FIXED CODE ###

A, B, C = map(int, input().split())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)
import sys

a, p = map(int, sys.stdin.readlines()[0].strip)
print((p + a * 3) // 2)

### FIXED CODE ###

import sys

a, p = map(int, sys.stdin.readlines()[0].strip().split())
print((p + a * 3) // 2)
s = list(map(int,input().split()))
t = s.pop(0)
s.sort()
d = 0
for i in range(0,t):
  c = 1
  for k in range(0,i):
    if s[i]%s[k]==0:
      c = 0
      break
  if c == 1:
    d = d+1
print(d)
  
    


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
M = 10**6 + 1
cnt = [0] * M
for a in A:
    if cnt[a] != 0:
        cnt[a] += 1
        continue
    for b in range(a, M, a):
        cnt[b] += 1
ans = 0
for a in A:
    if cnt[a] == 1:ans += 1
print(ans)
import numpy as np
A = np.array(input())
for i, val in numpy.ndenumerate(A):
    print('Case '+repr(i[0])+': '+repr(val))

### FIXED CODE ###

import sys
cnt = 1
for x in sys.stdin:
    i= int(x)
    if i == 0: break
    print('Case '+repr(cnt)+': '+repr(i))
    cnt+=1
Main.py
A, B, T = input()
n = (T + 0.5) // A
tot_biscuits = B * n
print(int(tot_biscuits))

### FIXED CODE ###

A, B, T  =  (int(_) for _ in input().split())
ans = (T + 0.5) // A
ans = int(ans * B )
print(ans)