Harryxun/stf_run huggingface dataset:
N = int(input())
A = list(map(int,input().split()))

MAX = 2*10**5+7
A.sort()

num_tmp = [0]*MAX

for a in A:
    if num_tmp[a] == 1:
        num_tmp[a] = 2
        continue
    for tmp in range(a,MAX,a):
        num_tmp[tmp] = 1

ans = 0
for a in A:
    if num_tmp[a] == 1:
        ans += 1
        
print(ans)

### FIXED CODE ###

def main():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort()
    MAX = A[-1]+1
    num_tmp = [0]*MAX

    for a in A:
        num_tmp[a] += 1
        if num_tmp[a] == 1:
            for i in range(2*a,MAX,a):
                num_tmp[i] = 2

    print(num_tmp.count(1))
    
main()
N,K = map(int,input().split())
A = list(map(int,input().split()))
ans = [float('inf')]*N
ans[0] = 0
for i in range(1,K+1):
  ans[i] = abs(A[0]-A[i])

for i in range(K+1,N):
  for j in range(0,min(i,K)):
    ans[i] = min(ans[i-j]+abs(A[i]-A[i-j]), ans[i-j-1]+abs(A[i]-A[i-j-1]))
print(ans[N-1])

### FIXED CODE ###

import numpy as np
N,K = map(int,input().split())
A = list(map(int,input().split()))
A = np.array(A)
ans = np.array([float('inf')]*N)
ans[0] = 0
K = min(N-1,K)
for i in range(1,K+1):
  ans[i] = abs(A[0]-A[i])
for i in range(K+1,N):
  ans[i] = min(ans[i],np.min(ans[i-K:i]+np.abs(A[i]-A[i-K:i])))
print(int(ans[N-1]))
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
       ans[a[i]-1] = i+1
for j in range(len(ans):
       print(ans[j] , end = " ")

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
       ans[a[i]-1] = i+1
for j in range(len(ans)):
       print(ans[j] , end = " ")
import math

N,X = (int(x) for x in input().split())
x = [int(p) for p in input().split()]
x.append(X)
x.sort()
D = x[1] - x[0]

for i in range(1,N-1):
    D = math.gcd(D,x[i+1]-x[i])

print(D)

### FIXED CODE ###

import fractions

N,X = (int(x) for x in input().split())
x = [int(p) for p in input().split()]
x.append(X)
x.sort()
D = x[1] - x[0]

for i in range(1,N):
    D = fractions.gcd(D,x[i+1]-x[i])

print(D)
a,b,c,k=map(int,input())
max_value=0
if k=<a+b:
  max_value=a
elif a+b<k=<a+b+c:
  max_value=a-k+a+b
print(max_value)

### FIXED CODE ###

a,b,c,k=map(int,input().split())
if a<=k<=a+b:
  max_value=a
elif k<a:
	max_value=k
else:
  max_value=a*2-k+b
print(max_value)
n=int(input())
arr=[int(i) for i in input().strip().split(" ")]
arr=sorted(arr)
arr=arr[::-1]
newArr=[arr[0]]
ans=0
for i in arr[1:]:
    newArr.append(arr[i])
    newArr.append(arr[i])
for i in range(n-1):
    ans+=newArr[i]
print(ans)



### FIXED CODE ###

n=int(input())
arr=[int(i) for i in input().strip().split(" ")]
arr=sorted(arr)
arr=arr[::-1]
# newArr=[arr[0]]
ans=0
# for i in range(1,n//2):
#     newArr.append(arr[i])
#     newArr.append(arr[i])
for i in range(1,n):
    # print()
    ans+=arr[i//2]
print(ans)
def main(text):
    n = int(input())
    a = [input() for i in range(n)]
    #a = text.split("\n")[1:]
    num = 0
    for i in range(len(a)):
        a[i] = "".join(sorted(a[i]))
    a.sort()
    i = 0
    while i < len(a):
        e = a[i]
        j = 1
        while i+j < len(a) and e == a[i+j]:
            j = j + 1
        if j != 1:
            num = num + combination(j)
            i = i+j
        else:
            i = i+1
    print(num)


def combination(x):
    return int(x*(x-1)/2)


main()


### FIXED CODE ###

def main(text=""):
    n = int(input())
    a = [input() for i in range(n)]
    #a = text.split("\n")[1:]
    num = 0
    for i in range(len(a)):
        a[i] = "".join(sorted(a[i]))
    a.sort()
    i = 0
    while i < len(a):
        e = a[i]
        j = 1
        while i+j < len(a) and e == a[i+j]:
            j = j + 1
        if j != 1:
            num = num + combination(j)
            i = i+j
        else:
            i = i+1
    print(num)


def combination(x):
    return int(x*(x-1)/2)


main()
import math
a, b = map(int,input().split())
g = math.gcd(a,b)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
if g == 1:
     print(1)
else:
     print(len(factorization(g))+1)

### FIXED CODE ###

import fractions
a, b = map(int,input().split())
g = fractions.gcd(a,b)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
if g == 1:
     print(1)
else:
     print(len(factorization(g))+1)
N, K = map(int,input().split())
if K == 1 or N == 0 or N == K or N%K == 0 or K%N == 0:
    print(0)
    exit()
elif K == 0:
    print(N)
    exit()
elif N == 1 or N == K-1 or K == N-1 or N%K == 1 or K%N == 1:
    print(1)
    exit()
else:
    res = []
    ans = N
    for i in range(max(N,K)):
        ans = ans - K
        l.append(ans)
        if i >= 5:
            if ans in res:
                print(min(res))
                exit()
    print(min(res))

### FIXED CODE ###

N, K = map(int,input().split())
if K == 1 or N == 0 or N == K or N%K==0:
    print(0)
elif K == 0:
    print(N)
elif N == 1 or N == K-1 or K == N-1 or N%K==1:
    print(1)
elif N > K:
    res = abs(N - (K*(N//K)))
    if abs(res - K) < res:
        print(abs(res-K))
    else:
        print(res)
elif K > N:
    if abs(K-N) < N:
        print(abs(K-N))
    else:
        print(N)
a, b, c = map(int, split(input()))
 
if (a < b < c):
    print("yes")
else:
    print("no")

### FIXED CODE ###

a, b, c = map(int, input().split())
 
if (a < b < c):
    print("Yes")
else:
    print("No")
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse
import numpy as np

parser = argparse.ArgumentParser(description='Range Product')
parser.add_argument('a', type=int)
parser.add_argument('b', type=int)
args = parser.parse_args()

a = args.a
b = args.b

if a > 0 and b > 0:
    print 'Positive'
elif a < 0 and b < 0:
    if (b - a) % 2 == 0:
        print 'Negative'
    else:
        print 'Positive'
else:
    print 'Zero'

### FIXED CODE ###

input = raw_input()
a, b = input.split()
a = int(a)
b = int(b)
if a > 0 and b > 0:
    print 'Positive'
elif a < 0 and b < 0:
    if (b - a) % 2 == 0:
        print 'Negative'
    else:
        print 'Positive'
else:
    print 'Zero'
# input
n = int(input())
H = list(map(int, input().split()))
dec_L = []
S = []

# classify
for i in range(n-1) : 
    # increase
    if H[i] < H[i+1] : 
        inc_flag = 1
        dec_flag = 0 
    # decrease
    elif H[i] > H[i+1] : 
        dec_flag = 1
        inc_flag = 0    
    # remain
    elif H[i] == H[i+1] and inc_flag == 1 : 
        pass
    elif H[i] == H[i+1] and dec_flag == 1 : 
        pass
    
    dec_L.append(dec_flag)
    
# make new list
for i in range(len(dec_L)-1) : 
    if dec_L[i] == 0 and dec_L[i+1] == 1 : 
        p_cut = i
    elif dec_L[i] == 1 and dec_L[i+1] == 0 and p_cut >= 0 : 
        S.append(H[p_cut+1:i+2])
    elif i == len(dec_L)-2 and dec_L[len(dec_L)-2] == 1 and dec_L[len(dec_L)-1] == 1 : 
        S.append(H[p_cut+1:i+3])

# exe
NO_flag = 0
for s in S : 
    if max(s) - min(s) >= 2 : 
        NO_flag = 1
        
if NO_flag == 1 : 
    print("No")
else : 
    print("Yes")

# # confirm
# print(H)    
# print(dec_L)
# print(S)

### FIXED CODE ###

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

No_flag = 0
for i in range(n-1, 0, -1) : 
    if H[i] >= H[i-1] : 
        pass
    elif H[i-1] - H[i] == 1 : 
        H[i-1] -= 1
    elif H[i-1] - H[i] >= 2 : 
        No_flag = 1
        break
    
if No_flag == 1 : 
    print("No")
else : 
    print("Yes")
n, a, b = map(int, input().split())
blue='c'*a
red='r'*b
s = str(blue+red)*(100*1000)
ss=s[:n]
print(ss.count('r'))

### FIXED CODE ###

n, a, b = map(int, input().split())
c = n//(a+b)
ans = c*a+min(n%(a+b), a)
print(ans)
S = str(input())
odd = ""
even = ""
flag=0
for i in range(len(S)):
  if i % 2 == 0:
    odd += S[i]
  else:
    even += S[i]    
odd = list(set(odd))
even = list(set(even))
if len(odd) == 3 and len(even) == 3:
  for i in range(len(odd)):
    if (odd[i] == 'R') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  for i in range(len(even)):
    if (odd[i] == 'L') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  if flag=0:
    print('Yes')
  else:
    print('No')
else:
  print('No')


### FIXED CODE ###

S = str(input())
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == 'L':
      print('No')
      exit()
    else:
      pass
  else:
    if S[i] == 'R':
      print('No')
      exit()
    else:
      pass
print('Yes')
r = input()
print(int(r*r))

### FIXED CODE ###

r = int(input())
s = r*r
print(int(s))
n = int(input())
march = {'M':0, 'A':0, 'R':0, 'C':0, 'H':0}
for i in range(n):
    str = input()
    if str[0] in march:
        march[str[0]] += 1
for i in list(march):
    if march[i] == 0:
        march.pop(i)
c = 0
if len(march) == 3:
    tmpc = 1
    for chr in march:
        tmpc *= march[chr]
    c += tmpc
elif len(march) == 4:
    for i in march:
        tmpm = march.copy()
        tmpm.pop(i)
        tmpc = 1
        for chr in tmpm:
            tmpc *= tmpm[chr]
        c += tmpc
elif len(march) == 5:
    for i in march:
        tmpm1 = march.copy()
        tmpm1.pop(i)
        for j in tmpm1:
            tmpm2 = tmpm1.copy()
            tmpm2.pop(j)
            tmpc = 1
            for chr in tmpm:
                tmpc *= tmpm[chr]
            c += tmpc
print(c)

### FIXED CODE ###

n = int(input())
march = {'M':0, 'A':0, 'R':0, 'C':0, 'H':0}
for i in range(n):
    str = input()
    if str[0] in march:
        march[str[0]] += 1
for i in list(march):
    if march[i] == 0:
        march.pop(i)
c = 0
if len(march) == 3:
    tmpc = 1
    for chr in march:
        tmpc *= march[chr]
    c += tmpc
elif len(march) == 4:
    for i in march:
        tmpm = march.copy()
        tmpm.pop(i)
        tmpc = 1
        for chr in tmpm:
            tmpc *= tmpm[chr]
        c += tmpc
elif len(march) == 5:
    keys = list(march.keys())
    for i in range(len(keys)):
        for j in range(i + 1, len(keys)):
            tmpm = march.copy()
            tmpm.pop(keys[i])
            tmpm.pop(keys[j])
            tmpc = 1
            for chr in tmpm:
                tmpc *= tmpm[chr]
            c += tmpc
print(c)
from collections import defaultdict
import sys
input = sys.stdin.readline
print = sys.stdout.write

class FenwickTree:
    def __init__(self, n):
        self.n = n
        self.dat = [0] * n
        
    def add(self, i, x):
        while i < self.n:
            self.dat[i] += x
            i += i & (-i)
    def sum(self, i):
        res = 0
        while i > 0:
            res += self.dat[i]
            i -= i & (-i)
        return res
    def rangesum(self, l, r):
        return self.sum(r) - self.sum(l-1)

N, Q = map(int, input().split())
C = [0] + list(map(int,input().split()))

ql, qid = defaultdict(list), defaultdict(list)

for i in range(Q):
    l, r = map(int, input().split())
    ql[r].append(l)
    qid[r].append(i)

A = [0] * (N+1)
ANS = [0] * (N+1)

FT = FenwickTree(N+1)

for i in range(1, N+1):
    if A[C[i]]:
        FT.add(A[C[i]], -1)
    FT.add(i, +1)
    A[C[i]] = i
    for j in range(len(ql[i])):
        ANS[qid[i][j]] = FT.rangesum(ql[i][j],i)

print("\n".join(map(str,ANS[:Q])))

### FIXED CODE ###

import numpy as np

def solve(inp):
    def bit_add(arr, n, i, x):
        while i <= n:
            arr[i] += x
            i += i & -i

    def bit_sum(arr, i):
        result = 0
        while i > 0:
            result += arr[i]
            i ^= i & -i
        return result

    N, Q = inp[:2]
    C = inp[2: 2+N]
    L, R = inp[2+N::2] - 1, inp[3+N::2] - 1

    just_left = {}
    segments = []
    for i in range(N):
        c = C[i]
        if c in just_left:
            segments.append((i, 0, just_left[c], 0))
        just_left[c] = i

    for i in range(Q):
        segments.append((R[i], 1, L[i], i))

    segments.sort()
    bit = np.zeros(N + 2, dtype=np.int64)
    ans = np.zeros(Q, dtype=np.int64)

    for r, tp, l, i in segments:
        if tp == 0:
            bit_add(bit, N + 2, l + 2, 1)
        else:
            base = r - l + 1
            ans[i] = base - (bit_sum(bit, r + 2) - bit_sum(bit, l + 1))

    return ans

def main():
    inp = np.fromstring(open(0).read(), dtype=np.int64, sep=' ')
    ans = solve(inp)
    print("\n".join(map(str,ans)))
    

def cc_export():
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('solve', '(i8[:],)')(solve)
    cc.compile()

if __name__ == '__main__':
    import sys
    if sys.argv[-1] == 'ONLINE_JUDGE':
        cc_export()
        exit(0)
    from my_module import solve
    main()
import numpy as np
import math

H, N = map(int, input().split())
mahou = np.array([list(map(int, input().split())) for _ in range(N)])

dmg = mahou[:, 0]
mp = mahou[:, 1]

dp = np.full(H+1, float("inf"))
dp[0] = 0

for h in range(H):
  for d, m in zip(dmg, mp):
    new_hp = min(h + d, H)
    dp[new_hp] = min(dp[new_hp], dp[h] + m)
print(int(dp[-1]))


### FIXED CODE ###

#import numpy as np
import math

H, N = map(int, input().split())
#mahou = np.array([list(map(int, input().split())) for _ in range(N)])
mahou = [list(map(int, input().split())) for _ in range(N)]


dp = [float("inf")]*(H+1)
dp[0] = 0

for h in range(H):
  for d, m in mahou:
    new_hp = min(h + d, H)
    dp[new_hp] = min(dp[new_hp], dp[h] + m)
print(int(dp[-1]))
a = int(input())
a >= 1
b = int(input())
b <= 10000

if a * b % 2 == 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

a, b = map(int,input(). split())

if (a * b) % 2 == 0:
    print('Even')
else:
    print('Odd')
n=int(input())
fir=int(input())
sec=int(input())
max=sec
if(fir>sec):
    min=sec
elif(fir<=sec):
    min=fir
max_dif=sec-fir
if n>2:
    for i in range(n-2):
        x=int(input())
        if x>max_num:
            max_num = x
            if max_dif < x-min:
                max_dif = x-min
        if x<min:
            min = x
            max_num=1
print(max_dif)

### FIXED CODE ###

#ALDS1_1_D Maximum Profit
n=int(input())
A=[]
max_dif=-1*10**9
for i in range(n):
    A.append(int(input()))
min=A[0]
for i in range(n-1):
    if(A[i+1]-min>max_dif):
        max_dif=A[i+1]-min
    if(min>A[i+1]):
        min=A[i+1]
print(max_dif)
import sys
import itertools

input = sys.stdin.readline

def main():
    common = common_function()
    N = int(input())
    l = ['M', 'A', 'R', 'C', 'H']
    m = [0]*5
    for _ in range(N):
        S = input()[:-1]
        Shead = S[0]
        for i, s0 in enumerate(l):
            if Shead == s0:
                m[i] += 1
                break
    ll = []
    for i, n in enumerate(m):
        if n >= 1:
            ll.append(l[i])
    if len(ll) <= 2:
        print(0)
        return
    ans = 0
    for i, j, k in itertools.combinations(ll, 3):
        ans += m[l.index(i)] * m[l.index(j)] * m[l.index(k)]

    print(ans)

if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
import itertools

input = sys.stdin.readline

def main():
    N = int(input())
    l = ['M', 'A', 'R', 'C', 'H']
    m = [0]*5
    for _ in range(N):
        S = input()[:-1]
        Shead = S[0]
        for i, s0 in enumerate(l):
            if Shead == s0:
                m[i] += 1
                break
    ll = []
    for i, n in enumerate(m):
        if n >= 1:
            ll.append(l[i])
    if len(ll) <= 2:
        print(0)
        return
    ans = 0
    for i, j, k in itertools.combinations(ll, 3):
        ans += m[l.index(i)] * m[l.index(j)] * m[l.index(k)]

    print(ans)

if __name__ == "__main__":
    main()
a = int(input())
b = int(input())

list = [a + b, a - b, a * b]

if a > 0:
  if b > 0:
    print(list[2])
  else:
    print(list[1])

else:
  if b > 0:
    print(list[0])
  else:
    print(list[2])

### FIXED CODE ###

A, B = (int(x) for x in input().split() )

print(max(A+B, A-B, A*B))
A, B = map(int(), input().split())
 
print(max(A+B, A-B, A*B))

### FIXED CODE ###

A, B = map(int, input().split())
print(max(A+B, A-B, A*B))
a=int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        res=[]
        if n % i == 0:
            res.append(i)
            if i != n // i:
                res.append(n//i)
        if res!=[]:
            divisors.append(res)
    return divisors

res=make_divisors(a)
my_min=0
for i in range(len(res)):
    if i==0:
        if len(res[i])==2:
            my_min=res[i][0]+res[i][1]
        else:
            my_min=(res[i]*2)
    else:
        if len(res[i])==2:
            my_min=min(my_min,res[i][0]+res[i][1])
        else:
            my_min=min(my_min,res[i]*2)

print(my_min-2)
         



### FIXED CODE ###

a=int(input())
 
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        res=[]
        if n % i == 0:
            res.append(i)
            if i != n // i:
                res.append(n//i)
        if res!=[]:
            divisors.append(res)
    return divisors
 
res=make_divisors(a)
my_min=0
for i in range(len(res)):
    if i==0:
        if len(res[i])==2:
            my_min=res[i][0]+res[i][1]
        else:
            my_min=(res[i][0]*2)
    else:
        if len(res[i])==2:
            my_min=min(my_min,res[i][0]+res[i][1])
        else:
            my_min=min(my_min,res[i][0]*2)
 
print(my_min-2)
S = input()

if S = 'ARC':
	print('ABC')
else
	ptint('ARC')

### FIXED CODE ###

S = input()

if S == 'ARC':
	print('ABC')
else:
	print('ARC')
import math
inp = input().split()
A = int(inp[0])
B = int(inp[1])

print(int(A*B/math.gcd(A, B)))

### FIXED CODE ###

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

inp = input().split()
A = int(inp[0])
B = int(inp[1])

print(int(A*B/gcd(A, B)))
from collections import defaultdict
import sys
from fractions import Fraction

count = defaultdict(int)
if 1:
    N = int(sys.stdin.readline())

    edges = defaultdict(list)
    for i in range(N):
        A, B = [int(x) for x in sys.stdin.readline().split()]
        if B == 0:
            angle = "I"
        else:
            angle = Fraction(A, B)
        count[angle] += 1

pairs = {}
solos = []
for k1 in count:
    if k1 in pairs:
        continue
    for k2 in count:
        if k1 * k2 == -1:
            pairs[k2] = k1
            break
    else:
        solos.append(k1)
print(pairs, solos)


def power(n):
    1000000007


result = 1
for p in pairs:
    print("pair", p, count[p], pairs[p], count[pairs[p]])
    n = count[p]
    m = count[pairs[p]]
    result *= (2 ** n - 1) + (2 ** m - 1) + 1
for k in solos:
    print("solo", k, count[k])
    result *= 2 ** count[k]

print(result - 1)


### FIXED CODE ###

from collections import defaultdict
import sys
from math import gcd
count = defaultdict(int)
N = int(sys.stdin.readline())

zeros = 0
for i in range(N):
    A, B = [int(x) for x in input().split()]
    if A == B == 0:
        zeros += 1
        continue
    if A == 0:
        angle = (0, 1)
    elif B == 0:
        angle = (1, 0)
    else:
        sgn = A // abs(A)
        g = gcd(A, B)
        angle = (A // sgn // g, B // sgn // g)

    count[angle] += 1
# print(count)

pairs = {}
solos = []
for k1 in count:
    if k1 in pairs:
        continue
    if k1 == (0, 1):
        if (1, 0) in count:
            pairs[(1, 0)] = k1
        else:
            solos.append(k1)
        continue

    A, B = k1
    if B:
        sgn = -B // abs(B)
        k2 = (-B // sgn, A // sgn)
    else:
        k2 = (0, 1)
    if k2 in count:
        pairs[k2] = k1
    else:
        solos.append(k1)
#print(pairs, solos)

P = 1000000007


def pow2(n):
    # if n < 30:
    #     return 2 ** n

    # p = pow2(n // 2)
    # pp = (p * p) % P
    # if n % 2 == 1:
    #     return (2 * pp) % P
    # else:
    #     return pp
    return pow(2, n, P)


result = 1
for p in pairs:
    # print("pair", p, count[p], pairs[p], count[pairs[p]])
    n = count[p]
    m = count[pairs[p]]
    result = result * ((pow2(n) - 1) + (pow2(m) - 1) + 1) % P
for k in solos:
    # print("solo", k, count[k])
    result = result * pow2(count[k]) % P

print((result + zeros - 1) % P)
N=int(input())
H=map(int, input().split())
for i in range(N-1):
    if H[i+1] < H[i]:
        print('No')
    else:
        print('Yes')

### FIXED CODE ###

N=int(input())
H=list(map(int, input().split()))
Z=0
count=0
for i in range(N-1):
    A=H[i+1]
    B=H[i]-1
    if A < B:
        print('No')
        Z=Z+1
        break
    if A == B:
        count=count+1
        if count >=2 and A < C:
            print('No')
            Z=Z+1
            break
        else:
            C=A
if Z == 0:
    print('Yes')
N, M = map(int, input().split())

answer = []
tmp = []

L, R = map(int, input().split())
answer = list(range(L, R+1))

for i in range(M-1):
    L, R = map(int, input().split())
    for j in range(L, R+1):
        if j in answer:
            tmp.append(j)
        elif j > answer[-1]:
            continue
            
    answer = tmp
    tmp = []

print(len(answer))

### FIXED CODE ###

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

if A >= 13:
    print(B)
elif A >= 6:
    print(int(B/2))
else:
    print("0")
n=int(input())
a=list(map(int,input().split()))
a.sort()
for i in range(n):
  if a[i]==a[-1]:
    print(a[-2])
  else:
    print(a[-1])

### FIXED CODE ###

import copy
n=int(input())
a=[int(input()) for i in range(n)]
b=copy.deepcopy(a)
b.sort()
for i in range(n):
  if a[i]==b[-1]:
    print(b[-2])
  else:
    print(b[-1])
n = input()

S = map(int, raw_input().split())

q = input()

T = map(int, raw_input().split())

cnt = 0
for j in range(q):
    left = 0
    right = n
    while left < right:
        mid = (left + right) / 2
        if S[mid] == T[j]:
            cnt = cnt + 1
        else if T[j] < S[mid]:
            right = mid
        else:
            left = mid + 1

print cnt

### FIXED CODE ###

n = input()

S = map(int, raw_input().split())

q = input()

T = map(int, raw_input().split())

cnt = 0
for j in range(q):
    left = 0
    right = n
    while left < right:
        mid = (left + right) / 2
        if S[mid] == T[j]:
            cnt = cnt + 1
            break
        elif T[j] < S[mid]:
            right = mid
        else:
            left = mid + 1

print cnt
import fractions
n,m=map(int,input().split())
lis  = list(map(int,input().split()))
#aそれぞれを2で割ったものを持っておく
div = []
for i in range(n):
    div.append(lis[i]//2)
#lisそれぞれの要素を2で割り切れる回数をすべて数える
L = []
for i in range(n):
    cnt = 0
    while lis[i] %2 ==0:
        lis[i] //= 2
        cnt += 1
    L.append(cnt)

bl = True
#重複要素を削除して要素数でLがすべて一緒か判断
def set_list(es):
    return len(list(set(es))) == 1

if set_list(L) != 1:
    print(0)
    exit()

#div内の最小子公倍数Tを求める
T = 0
ans = div[0]
for i in range(1,n):
    ans =ans*div[i]//fractions.gcd(ans,div[i])
    T = ans

S = m//T
if S %2 ==0:
    print(S//2)
else:
    print(S//2 +1)

### FIXED CODE ###

import fractions
n,m=map(int,input().split())
lis  = list(map(int,input().split()))
#aそれぞれを2で割ったものを持っておく
div = []
for i in range(n):
    div.append(lis[i]//2)
#lisそれぞれの要素を2で割り切れる回数をすべて数える
L = []
for i in range(n):
    cnt = 0
    while lis[i] %2 ==0:
        lis[i] //= 2
        cnt += 1
    L.append(cnt)

bl = True
#重複要素を削除して要素数でLがすべて一緒か判断
def set_list(es):
    return len(list(set(es))) == 1

if set_list(L) != 1:
    print(0)
    exit()

#div内の最小子公倍数ansを求める

ans = div[0]
for i in range(1,n):
    ans =ans*div[i]//fractions.gcd(ans,div[i])

S = m//ans
if S %2 ==0:
    print(S//2)
else:
    print(S//2 +1)
N = int(input())
M = [[int(i) for i in input().split()] for i in range(N)]
C = 0

for i in range(N):
    if A[i][1] == 'JPY':
        C += M[i][0]
    elif A[i][1] == 'BTC':
        C += M[i][0]*380000

print(C)

### FIXED CODE ###

N = int(input())
M = [[i for i in input().split()] for i in range(N)]
C = 0

for i in range(N):
    if M[i][1] == 'JPY':
        C += int(M[i][0])
    elif M[i][1] == 'BTC':
        C += float(M[i][0])*380000

print(C)