Harryxun/stf_run huggingface dataset:
n = int(input())

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

v.sort(reverse = True)

while len(v) > 1 :
    v.append((v.pop(-1) + v.pop(-2))/2)
    v.sort(reverse = True)

print(v)


### FIXED CODE ###

n = int(input())

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

v.sort(reverse = True)

while len(v) > 1 :
    v.append((v.pop(-1) + v.pop(-1))/2)
    v.sort(reverse = True)

print(v[0])
def solve():
    import numpy as np
    from sys import stdin
    f_i = stdin
    
    H, W = map(int, f_i.readline().split())
    A = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    B = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    
    DP = np.full((H + 1, W + 1, (H * W) * 80), False)
    DP[0][1][0] = True
    for i in range(1, H + 1):
        for j in range(1, W + 1):
            diff = A[i-1][j-1] - B[i-1][j-1]
            for pre_bias in np.where(DP[i-1][j] == True)[0]:
                bias = abs(pre_bias + diff)
                DP[i][j][bias] = True
                bias = abs(pre_bias - diff)
                DP[i][j][bias] = True
            for pre_bias in np.where(DP[i][j-1] == True)[0]:
                bias = abs(pre_bias + diff)
                DP[i][j][bias] = True
                bias = abs(pre_bias - diff)
                DP[i][j][bias] = True
    
    ans = np.where(DP[-1][-1] == True)[0][0]
    print(ans)

solve()

### FIXED CODE ###

def solve():
    from sys import stdin
    f_i = stdin
    
    H, W = map(int, f_i.readline().split())
    A = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    B = tuple(tuple(map(int, f_i.readline().split())) for i in range(H))
    
    dp1 = [0] * W
    bit_width = 80 * (H + W - 2)
    dp1[0] = 1 << (bit_width)
    for A_i, B_i in zip(A, B):
        dp2 = [0] * W
        
        diff = abs(A_i[0] - B_i[0])
        dp2[0] = (dp1[0] << diff) | (dp1[0] >> diff)
        
        for j, t in enumerate(zip(A_i[1:], B_i[1:]), start=1):
            A_ij, B_ij = t
            diff = abs(A_ij - B_ij)
            b = dp1[j] | dp2[j-1]
            dp2[j] = (b << diff) | (b >> diff)
        
        dp1 = dp2
    
    b = bin(dp2[-1])
    b = b[-bit_width-1:]
    print(b.index('1'))
 
solve()
a=map(str, input())
print(a[0:3])

### FIXED CODE ###

a=input()
print(a[0:3])
S = input()

if re.fullmatch(r'A[a-z]+C[a-z]+', S):
    print('AC')
else:
    print('WA')

### FIXED CODE ###

import re
S = input()

if re.fullmatch(r'A[a-z]+C[a-z]+', S):
    print('AC')
else:
    print('WA')
n,k=list(map(int,input().split()))
A=list(map(int,input().split()))
start,i,j=1,0,0
root=[1]

for j in range(k):
  start=A[start-1]
  if start in root:
    i = start
    break
  root.append(start)
  
if k <= len(root):
  print(root[k-1])
else:
  newroot=root[i-1:]
  print(newroot)
  ans=(k-len(root))%len(newroot)
  print(newroot[ans])

### FIXED CODE ###

n,k=list(map(int,input().split()))
A=list(map(int,input().split()))
start,steps=1,0
root=dict()

while start not in root and steps < k:
  root[start]=steps
  steps+=1
  start=A[start-1]

if steps == k:
  print(start)
else:
  pa = steps-root[start]
  ans= root[start] + (k-steps)%pa
  root={v: k for k, v in root.items()}
  print(root[ans])
x,n=map(int,input().split())
lis=[i+1 for i in range(100)]
flag=True
if n==0:
  flag=False
  print(x)
if flag:
  p=list(map(int,input().split()))
  for i in p:
    lis.remove(i)
  for i in range(len(lis)):
    if lis[i]>x:
      id=i
      break
  if id>=1:
    if abs(x-lis[id])<abs(x-lis[id-1]):
      print(lis[id])
    else:
      print(lis[id-1])
  else:
    print(lis[0])

### FIXED CODE ###

x,n=map(int,input().split())
lis=[i-1 for i in range(103)]
flag=True
if n==0:
  flag=False
  print(x)

if flag:
  p=list(map(int,input().split()))
  for i in p:
    lis.remove(i)
  #print(lis)
  for i in range(len(lis)):
    if lis[i]>x:
      index=i
      break
  if abs(x-lis[index])<abs(x-lis[index-1]):
    print(lis[index])
  else:
    print(lis[index-1])
import sys
input = sys.stdin.readline
import numpy as np
import time


def make_table(n, m):
    Table = np.random.randint(1,m+1)
    return Table

t0 = time.time()
n, m, q = map(int, input().split())
Lis = [[int(e) for e in input().split()] for _ in range(q)]

Sum_cor = []
for i in range(10000000000):
    Table = make_table(n,m)
    Table.sort()
    d_sum = 0
    for l in Lis:
        if Table[l[1]-1]-Table[l[0]-1] == l[2]:
            d_sum+=l[3]
    Sum_cor.append(d_sum)
    t1 = time.time()
    if t1-t0 >1.88:
        print(max(Sum_cor))
        break


### FIXED CODE ###

import sys
input = sys.stdin.readline
import numpy as np

from itertools import combinations_with_replacement as CwR



n, m, q = map(int, input().split())
Lis = [[int(e) for e in input().split()] for _ in range(q)]

Tables = list(CwR(range(1,m+1),n))
Sum_cor = []
for Table in Tables:
    d_sum = 0
    for l in Lis:
        if Table[l[1]-1]-Table[l[0]-1] == l[2]:
            d_sum+=l[3]
    Sum_cor.append(d_sum)

print(max(Sum_cor))
N = int(input())
A = list(map(int, input().split()))
A.sort()
i = 0

while i < len(A) - 2:
    if A[i] == A[i + 1]:
        A.pop(i)
        A.pop(i + 2)
    else:
        i += 1

print(len(A))
        



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

B = list(set(A))

if len(B) % 2 == 0:
    print(len(B) - 1)
else:
    print(len(B))
n, k = map(int, input().split())
n_list = [1]*n
for _ in range(b):
  _ = input()
  for i in range(list(map(int, input().split()))):
    n_list[i-1] = 0
print(sum(n_list))

### FIXED CODE ###

n, k = map(int, input().split())
n_list = [1]*n
for _ in range(k):
  _ = input()
  for i in list(map(int, input().split())):
    n_list[i-1] = 0
print(sum(n_list))
n = int(input())
anagrams = ["".join(sorted(input())) for i in range(n)]
from scipy.special import comb
print(sum([comb(anagrams.count(word), 2, exact=True)\
          for word in set(anagrams)]))

### FIXED CODE ###

n = int(input())
anagrams = ["".join(sorted(input())) for i in range(n)]
from collections import defaultdict
d = defaultdict(list)
for i in range(n):
    d[anagrams[i]].append(i)
from scipy.misc import comb
cnt=0
for k, v in d.items():
    cnt+=comb(len(v), 2, exact=True)
print(cnt)
a,b,x = map(int,input().split)
if a>0:
  a-=1
else:
  b+=1
print(b//x - a//x)

### FIXED CODE ###

a,b,x = map(int,input().split())
b = b//x
a = a//x-1 if a%x==0 else a//x
print(b-a)
S = raw_input()
MISSED_IDX = 3
S[MISSED_IDX] = 8

print S


### FIXED CODE ###

S = raw_input()
MISSED_IDX = 3
res = list(S)
res[MISSED_IDX] = '8'

print "".join(res)
A,B,C = map(str,input().split("/"))
if int(A) <= 2018:
  print("Heisei")
elif int(A) = 2019,int(B) <=4,int(C)<=30:
  print("Heisei")
elif int(A)>=2019:
print("TBD")

### FIXED CODE ###

A,B,C = map(str,input().split("/"))
if int(A) <= 2018:
  print("Heisei")
elif int(A) == 2019 and int(B) <=4 and int(C)<=30:
  print("Heisei")
else:
  print("TBD")
import sys
input = sys.stdin.readline
import math

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

lcm = A * B // math.gcd(A,B)

print(lcm)

### FIXED CODE ###

import sys
input = sys.stdin.readline
import fractions

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

lcm = A * B // fractions.gcd(A,B)

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

i = 0
j = 0
bt = 0

while i < n:
  while j < n - i:
    if a[i+j] == i+1:
      bt += 1
      break
    if j + i == n-1:
      if i == 0:
        bt = -1
      j = n + 1
      i = n + 1
      
    j += 1
  i += 1
  
if bt != -1:
  bt = n - bt
  
print(bt)

### FIXED CODE ###

Answer = [1, 2, 3]

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

Answer.remove(A)
Answer.remove(B)

print(Answer[0])
import sys
input=lambda: sys.stdin.readline().rstrip()
t=int(input())
for _ in range(t):
  c,d=map(int,input().split())
  XX=[int(i) for i in input().split()]
  Y=[]
  YY=[]
  X=[0]*c
  for i,x in enumerate(XX):
    if x>0:
      Y.append(x)
      X[i+1]=x
    else:
      YY.append((-x,i+1))

  Y.sort()
  Y=[0]+Y
  YY.sort()
  for x,i in YY:
    X[i]=Y[x-1]+1
    Y=Y[:x]+[Y[x-1]+1]+Y[x:]



  edge=[[] for i in range(c)]
  E=[0]*d
  for i in range(d):
    u,v=map(int,input().split())
    edge[u-1].append([v-1,i])
    edge[v-1].append([u-1,i])
  
  D=[[] for i in range(1000)]
  for i in range(1,c):
    D[X[i]].append(i)
  for i in range(1,1000):
    if not D[i]:
      continue
    else:
      for goal in D[i]:
        t_root=0
        dist=float("inf")
        t_ind=0
        for root,ind in edge[goal]:
          if X[root]<dist:
            t_root=root
            dist=X[root]
            t_ind=ind
        E[t_ind]=i-dist
  for i in range(d):
    if E[i]==0:
      E[i]=str(10**6)
    else:
      E[i]=str(E[i])
  ans=" ".join(E)
  print("Case #"+str(_+1)+": "+ans)



### FIXED CODE ###

import sys
input=lambda: sys.stdin.readline().rstrip()
s,w=map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")
def solve(n, y):
    for man in range(0, n + 1):
        for gosen in range(0, n - man + 1):
            sen = n - man - gosen
            if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n:
                print(man, gosen, sen)
                return 0

    print("-1 -1 -1")
    return 0            

#main
n = int(input())
y = int(input())
solve(n ,y)




### FIXED CODE ###

def solve(n, y):
    for man in range(n + 1):
        for gosen in range(n - man + 1):
            sen = n - man - gosen
            if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n:
                print('{} {} {}'.format(man, gosen, sen))
                return
    print("-1 -1 -1")
    return            

#main
n, y = map(int, raw_input().split())
solve(n, y)
while True:
    n,w=map(int,raw_input().split())
    if n==w==0:break
    L=[0]*n
    for i in range(n):
        v=input()
        L[v/w]+=1
    maxh=max(L)
    r=n-1
    while r>0 and L[r]==0:
        r-=1
    ink=0.01
    for i in range(r+1):
        ink+=float(r-i)/r*float(L[i])/maxh
    print ink

### FIXED CODE ###

while True:
    n,w=map(int,raw_input().split())
    if n==w==0:break
    L=[0]*(w+1)
    for i in range(n):
        v=input()
        L[v/w]+=1
    maxh=max(L)
    r=w
    while r>0 and L[r]==0:
        r-=1
    ink=0.01
    for i in range(r+1):
        if r<>0:
            ink+=float(r-i)/r*float(L[i])/maxh
        else:
            ink+=L[i]
    print ink
word = input()
number = 0
while True:
    row = input()
    if row == 'END_OF_TEXT':
        break
    row.replace('.', ' ')
    row.replace("'", " ")
    row.replace('-', ' ')
    wordlist = list(row.lower().split())
    number += wordlist.count(word.lower())
print(number

### FIXED CODE ###

word = input().lower()
number = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    line = line.replace('.', ' ').replace("'", " ").replace('"', ' ').replace('?',' ').replace('!', ' ').replace(',',' ')
    wordlist = list(line.lower().split())
    number += wordlist.count(word)
print(number)
s = list(int(input()))
b = 0
for i in range(len(s)):
    b += int(s[i])
print(s)

### FIXED CODE ###

target=input()
t=sum(list(map(int,target)))
if int(target)%t == 0:
    print("Yes")
else:
    print("No")
import math

N = int(input())
xy_list = [0] * N
for i in range(N):
    xy_list.append(input().split())
result = 0
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        city1 = math.pow(xy_list[i][0] - xy_list[j][0], 2)
        city2 = math.pow(xy_list[i][1] - xy_list[j][1], 2)
        result += math.sqrt(city1 + city2)
print("{:.10f}".format(result / N))


### FIXED CODE ###

import math

N = int(input())
xy_list = []
for i in range(N):
    xy_list.append([int(i) for i in input().split()])
result = 0
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        city1 = math.pow(xy_list[i][0] - xy_list[j][0], 2)
        city2 = math.pow(xy_list[i][1] - xy_list[j][1], 2)
        result += math.sqrt(city1 + city2)
print("{:.10f}".format(result / N))
import random
S = input()
rand = random.randrange(0, len(S) - 1)  # 最後から２つは入れないため
print(S[rand] + S[rand + 1] + S[rand + 2])


### FIXED CODE ###

import random
S = input()
rand = random.randrange(0, len(S) - 2)
print(S[rand] + S[rand + 1] + S[rand + 2])
N, K = input().split()
N = int(N)
K = int(K)
S = input()
A = []
for i in range(len(S)-1):
    if (S[i]=="0" and S[i+1]=="1") or (S[i]=="1" and S[i+1]=="0"):
        A.append(i+1)
A.insert(0, 0)
A.append(N)
M = []
if S[0] == "0":
    M.append(A[K*2]-A[0])
    a = 1
    b = a + K*2 + 1
elif S[0] == "1":
    a = 0
    b = a + K*2 + 1
if S[-1] == "1":
    while b <= len(A):
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
elif S[-1] == "0":
    while b <= len(A)-1:
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
    M.append(A[-1]-A[-1-K*2])
print(max(M))

### FIXED CODE ###

N, K = input().split()
N = int(N)
K = int(K)
S = input()
A = []
for i in range(len(S)-1):
    if (S[i]=="0" and S[i+1]=="1") or (S[i]=="1" and S[i+1]=="0"):
        A.append(i+1)
A.insert(0, 0)
A.append(N)
M = []
if S == "0"*N:
    M.append(len(S))
elif S[0] == "0":
    if K > len(A)//2:
        K = len(A)//2
    M.append(A[K*2]-A[0])
    a = 1
    b = a + K*2 + 1
elif S[0] == "1":
    if K > (len(A)-1)//2:
        K = (len(A)-1)//2
    a = 0
    b = a + K*2 + 1
if S == "0"*N:
    pass
elif S[-1] == "1":
    while b <= len(A):
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
elif S[-1] == "0":
    while b <= len(A)-1:
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
    M.append(A[-1]-A[-1-K*2])
print(max(M))
a = 700
b = input("").count('o').count('x')
     
if b == 3:
  c = a + 300
  print(c)
      
if b == 2:
  d = a + 200
  print(d)
      
if b == 1:
  e = a + 100
  print(e)
  
if b == "x":
  print(a)

### FIXED CODE ###

print(700+100*input().count('o'))
s=input()
if len(s)%2=0 and s == 'hi'*len(s)//2:
    print('Yes')
else:
  print('No')

### FIXED CODE ###

string = input()
for i in range(len(string)):
    if i % 2 == 0:
        if string[i] == 'h':
            continue
        else:
            print('No')
            break
    elif i % 2 == 1:
        if string[i] == 'i':
            continue
        else:
            print('No')
            break
else:
    if len(string) % 2 == 1:
        print('No')
    else:
        print('Yes')
import math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l = x*2 / suf2
    x = b/l
    ans = math.degrees(math.atan(x))
else:
    l = (vol-x)*2 / (a*a)
    x = a/l
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))

### FIXED CODE ###

import math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l1 = x*2 / suf2
    x = float(b)/l1
    ans = math.degrees(math.atan(x))
else:
    l2 = (vol-x)*2 / (a*a)
    x = l2/float(a)
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))
N, Q = map(int, input().split())
S = input()
LR = [list(map(int, input().split())) for _ in range(Q)]
#dp[i]はi番目までの文字で'AC'がいくつあるか
dp = [0] * (N+1)
for i in range(1, N+1):
    if S[i-1] == 'A' and S[i] == 'C':
        dp[i] = dp[i-1] + 1
    else:
        dp[i] = dp[i-1]

for l, r in LR:
    print(dp[r-1] - dp[l-1])


### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
LR = [list(map(int, input().split())) for _ in range(Q)]
#dp[i]はi番目までの文字で'AC'がいくつあるか
dp = [0] * (N+1)
for i in range(1, N):
    if S[i-1] == 'A' and S[i] == 'C':
        dp[i] = dp[i-1] + 1
    else:
        dp[i] = dp[i-1]

for l, r in LR:
    print(dp[r-1] - dp[l-1])
S=input()
T=input()
d=[[] for i in range(26)]
for i,c in enumerate(S):
    d[ord(c)-ord('a')].append(i)
d2=[[] for i in range(26)]
for i,c in enumerate(T):
    d2[ord(c)-ord('a')].append(i)
d.sort(key=lambda x:x[0])
d2.sort(key=lambda x:x[0])
f=1
for i in range(26):
    if len(d[i])!=len(d2[i]):
        f=0
    else:
        for j in range(len(d[i])):
            if d[i]!=d2[i]:
                f=0
print(['No','Yes'][f])

### FIXED CODE ###

S=input()
T=input()
d=[[] for i in range(26)]
for i,c in enumerate(S):
    d[ord(c)-ord('a')].append(i)
d2=[[]for i in range(26)]
for i,c in enumerate(T):
    d2[ord(c)-ord('a')].append(i)
print(['No','Yes'][set((tuple(x) for x in d))==set((tuple(x) for x in d2))])
import numpy as np
 
first_int = [int(k) for k in input().split()]
a = first_int[0]
b = first_int[1]
secound_list = [int(k) for k in input().split()]
 
def sigm(k):
  return k*(k+1)/2
 
all_sigm = [sigm(k) for k in secound_list]
all_sigm_ = [sum(all_sigm[k:k+b]) for k in range(a)]
print(max(all_sigm_))

### FIXED CODE ###

a = input().split()
b = [int(k) for k in input().split()]
c = input()

if a[0] == c:
  b[0] -= 1
else:
  b[1] -= 1

print('{0} {1}'.format(b[0],b[1]))
def hoge(n, m):
    n = n % 12
    b = 30*n+0.5*m
    s = 6*m
    ans = min(abs(b-s), 360-abs(b-s))
    if ans == 360:
        ans = 0
    return ans

def solve():
  a, b, h, n = map(int, input().split())
  p = hoge(h, n)
  ans = math.sqrt(a**2+b**2-(2*a*b*math.cos(math.radians(p))))
  print(ans)
  return 0
 
if __name__ == "__main__":
  solve()


### FIXED CODE ###

import numpy as np
import functools
import math
import collections
import scipy
import fractions
import itertools

def hoge(n, m):
    n = n % 12
    b = 30*n+0.5*m
    s = 6*m
    ans = min(abs(b-s), 360-abs(b-s))
    if ans == 360:
        ans = 0
    return ans

def solve():
  a, b, h, n = map(int, input().split())
  p = hoge(h, n)
  ans = math.sqrt(a**2+b**2-(2*a*b*math.cos(math.radians(p))))
  print(ans)
  return 0
 
if __name__ == "__main__":
  solve()
N = int(input())
A = list(map(int, input().split()))
ans = 1

for i in range(N):
  	ans *= A[i]
	if np.prod(A) > 10**18:
    	print("-1")
        break
print(ans)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
if 0 in A:
    print(0)
    exit()
ans=1
for i in A:
    ans*=i
    if ans>10**18:
        print(-1)
        exit()
print(ans)
a=input()
n=['SUN','MON','TUE','WED','THU','FRI','SAT']
if a!='SAT':
  print(n[6]-n.index(a))
else:
  print(7)

### FIXED CODE ###

a=input()
n=['SUN','MON','TUE','WED','THU','FRI','SAT']
if a!='SAT':
  print(7-n.index(a))
else:
  print(1)
s = input()
t = input()
count = 0
 for i,j in zip(s,t):
  if i==j:
     count += 1
print(count)

### FIXED CODE ###

s = input()
t = input()
count = 0
for i,j in zip(s,t):
  if i==j:
    count += 1
print(count)
N, M = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(M)]
sc.sort()
pin = 0
if N == 1:
  tmp = sc[0][1]
  for i in range(M):
    if tmp != sc[i][1]:
      print(-1)
      pin = 1
      break
  if pin == 0:
    print(tmp)
else:
  pin = 0
  ans_lis = [0] * N
  tmp_s = sc[0][0]
  tmp_c = sc[0][1]
  for i in range(M):
    if sc[i][0] == 1 and sc[i][1] == 0:
      print(-1)
      pin = 1
      break
    if tmp_s == sc[i][0]:
      if tmp_c != sc[i][1]:
        print(-1)
        pin = 1
        break
    else:
      ans_lis[tmp_s -1] = tmp_c
      tmp_s = sc[i][0]
      tmp_c = sc[i][1]
  if pin == 0:
    ans_lis[tmp_s -1] = tmp_c
    if ans_lis[0] == 0:
      ans_lis[0] = 1
    lis = map(str, ans_lis)
    mojiretsu = ''
    for x in lis:
      mojiretsu += x
    print(mojiretsu)
      
      


### FIXED CODE ###

N, M = map(int, input().split())
if M == 0:
  if N == 1:
    print(0)
  elif N==2:
    print(10)
  else:
    print(100)
else:
  sc = [list(map(int, input().split())) for i in range(M)]
  sc.sort()
  pin = 0
  if N == 1:
    tmp = sc[0][1]
    for i in range(M):
      if tmp != sc[i][1]:
        print(-1)
        pin = 1
        break
    if pin == 0:
      print(tmp)
  else:
    pin = 0
    ans_lis = [0] * N
    tmp_s = sc[0][0]
    tmp_c = sc[0][1]
    for i in range(M):
      if sc[i][0] == 1 and sc[i][1] == 0:
        print(-1)
        pin = 1
        break
      if tmp_s == sc[i][0]:
        if tmp_c != sc[i][1]:
          print(-1)
          pin = 1
          break
      else:
        ans_lis[tmp_s -1] = tmp_c
        tmp_s = sc[i][0]
        tmp_c = sc[i][1]
    if pin == 0:
      ans_lis[tmp_s -1] = tmp_c
      if ans_lis[0] == 0:
        ans_lis[0] = 1
      lis = map(str, ans_lis)
      mojiretsu = ''
      for x in lis:
         mojiretsu += x
      print(mojiretsu)
S = list(map(int, input().split()))
T = list(map(int, input().split()))

i = 0
reslt = 0
for item in S:
    if S[i] == T[i]:
        reslt += 1
    i += 1

print(result)


### FIXED CODE ###

S = input()
T = input()

i = 0
result = 0
for item in [0,0,0]:
    if S[i] == T[i]:
        result += 1
    i += 1

print(result)
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import pandas as pd
n = int(input())
s = [input() for i in range(n)]
d = pd.Series(s).value_counts()
print('\n'.join(sorted(list(d[d==max(d)].index))))

### FIXED CODE ###

import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

from collections import Counter
n = int(input())
s = Counter([input() for i in range(n)])
high = max(s.values())
ans = [k for k,v in s.items() if v==high]
print('\n'.join(sorted(ans)))
N = int(input())
an = list(map(int,input().split()))
ave  = round((sum(an)/N),0)
print(ave)
ans = 0

for i in an:
    ans += (i-ave)**2

print(inst(ans))

### FIXED CODE ###

N = int(input())
an = list(map(int,input().split()))
ave  = round((sum(an)/N),0)
ans = 0

for i in an:
    ans += (i-ave)**2

print(int(ans))
import math


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def main():
    n, m = map(int, input().split())
    print(combinations_count(n, 2) + combinations_count(m, 2))


if __name__ == "__main__":
    main()


### FIXED CODE ###

import math


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def main():
    n, m = map(int, input().split())
    if n < 2:
        even = 0
    else:
        even = combinations_count(n, 2)
    if m < 2:
        odd = 0
    else:
        odd = combinations_count(m, 2)
    print(even + odd)


if __name__ == "__main__":
    main()
for i in range(ord('a'), ord('z')+1):
  if chr(i) in s:
    print(chr(i))
    exit()
print('None')

### FIXED CODE ###

s = input()
for i in range(ord('a'), ord('z')+1):
  if chr(i) not in s:
    print(chr(i))
    break
else:
  print('None')
n,t=map(int,input().split())
x=list(map(int,input().split()))
a=t
for i in range(n-1):
  a.append(min(x[i+1]-x[i],t))
print(a)

### FIXED CODE ###

n,t=map(int,input().split())
x=list(map(int,input().split()))
a=t
for i in range(n-1):
  a+=min(x[i+1]-x[i],t)
print(a)
X = input()

if (X == A):
    print(“T”)
elif (X ==T):
    print(“A”)
elif (X == G):
    print(“C”)
else:
    print(“G”)

### FIXED CODE ###

X = input()

if (X == "A"):
    print("T")
elif (X =="T"):
    print("A")
elif (X == "G"):
    print("C")
else:
    print("G")
N=int(input())
A=list(map(int, input().split()))
A.sort()
inf=10**2+1
t=[True for i in range(inf)]

ans=0
for j in range(len(A)):
    if j==len(A)-1 and t[A[j]]:
        ans+=1
    if t[A[j]] and j+1<=N-1 and A[j+1]!=A[j]:
        ans+=1
        for nums in range(A[j],inf,A[j]):
            t[nums]=False
print(ans)

### FIXED CODE ###

N=int(input())
A=list(map(int, input().split()))
A.sort()
inf=10**6+1
t=[True for i in range(inf)]

ans=0
for j in range(N):
    if j+1<=N-1 and t[A[j]]:
        if A[j+1]!=A[j]:
            ans+=1
        else:
            t[A[j]]=False
        for numb in range(A[j],inf,A[j]):
            t[numb]=False
    elif j==N-1 and t[A[j]]:
        ans+=1

print(ans)