Harryxun/stf_run huggingface dataset:
def q4():
    N = int(input())
    arr = prime_factorize(N)
    if not arr:
        print(0)
        return

    ans_count = 0
    count = 1

    min_val = min(arr)
    while arr:
        if arr.count(min_val) < count:
            arr = list(filter(lambda a: a != min_val, arr))
            count = 1
            if not arr:
                break
            min_val = min(arr)
            continue
        arr = arr[count:]
        ans_count += 1
        count += 1
    print(ans_count)


q4()


### FIXED CODE ###


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


def q4():
    N = int(input())
    arr = prime_factorize(N)
    if not arr:
        print(0)
        return

    ans_count = 0
    count = 1

    min_val = min(arr)
    while arr:
        if arr.count(min_val) < count:
            arr = list(filter(lambda a: a != min_val, arr))
            count = 1
            if not arr:
                break
            min_val = min(arr)
            continue
        arr = arr[count:]
        ans_count += 1
        count += 1
    print(ans_count)


q4()
#!/usr/bin/env python3
import sys
from collections import deque


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


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


def main():
    n, m, k = MI()
    a = deque(LI())
    b = deque(LI())

    read = []
    isAll = False

    while sum(read) <= k:
        if len(a) == 0 and len(b) == 0:
            isAll = True
            break
        if len(a) == 0 or a[0] >= b[0]:
            b_top = b.popleft()
            read.append(b_top)
            continue
        if len(b) == 0 or a[0] < b[0]:
            a_top = a.popleft()
            read.append(a_top)
            continue

    if isAll:
        print(len(read))
    else:
        print(len(read) - 1)


# oj t -c "pypy3 main.py"
# acc s main.py -- --guess-python-interpreter pypy
main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
from collections import deque


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


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


def main():
    n, m, k = MI()
    a = deque(LI())
    b = deque(LI())

    A, B = [0], [0]

    for i in range(len(a)):
        A.append(A[i]+a[i])
    for i in range(len(b)):
        B.append(B[i]+b[i])

    index = m
    ans = [0]
    for i in range(len(a)+1):
        rest = k - A[i]
        if rest < 0:
            break

        while B[index] > rest:
            index -= 1

        ans.append(i + index)

    print(max(ans))


    # oj t -c "pypy3 main.py"
    # acc s main.py -- --guess-python-interpreter pypy
main()
m = int(input())
dc = []

sum_c = 0
before_num = 0
add_two = 0
kuriage = 0

dc = [list(map(int, input().split())) for _ in range(m)]
 
d = [dc[i][0] for i in range(m)]
c = [dc[i][1] for i in range(m)]
  
cnt =sum(c) - 1

for i in range(m):
  add_two += int(dc[i][0]) * int(dc[i][1])
  if add_two % 9 == 0:
    cnt += add_to // 9
    add_two = 9
  else:
    cnt += add_two // 9
    add_two = add_two % 9

print(cnt)

### FIXED CODE ###

#https://atcoder.jp/contests/ddcc2020-qual/submissions/8587774

M = int(input())
dc = [list(map(int, input().split())) for _ in range(M)]
 
d = [dc[i][0] for i in range(M)]
c = [dc[i][1] for i in range(M)]
 
ans = sum(c) - 1
s = 0
 
for i in range(M):
    s += c[i] * d[i]
    if s % 9 != 0:
        ans += s // 9
        s = s % 9
    else:
        ans += s//9 - 1 
        s = 9
print(ans)
a, b = map(int, input().split())
print(sum(range(b-a)-a)

### FIXED CODE ###

a, b = map(int, input().split())
print(sum(range(b-a))-a)
a,b,c,d = map(int,input().split())

print(min(b, d) - max(a, c))

### FIXED CODE ###

N = input()

if N[0] == N[2]:print("Yes")
else:print("No")
from collections import deque
from collections import Counter
S = list((input()))
A = deque([0])
B = deque([])
for i in range(len(S)):
    n = int(''.join(S[len(S)-2-i:]))
    A.append(n)
for j in A:
    B.append(j%2019)
C = Counter(B)
cnt= 0
for v in C.values():
    cnt += v*(v-1)//2
print(cnt)

### FIXED CODE ###

s,w = list(map(int,input().split()))
if w >= s:
    print('unsafe')
else:
    print('safe')
def is_bool(x):
	return isinstance(x,int) and bool(1 <= x) and bool(x <= 10000)

def checker(a, b):
	if is_bool(a) and is_bool(b):
		if (a * b) % 2 == 0:
			return 'Even'
		else:
	return 'Odd'

print(checker(2, 3))

### FIXED CODE ###

a, b = map(int, input().split())
if (a * b) % 2 == 0:
    print('Even')
else:
    print('Odd')
n = int(input())
array = list(map(int, input().strip().split(" ")))
ans = [0]*n

for i in range(n):
    ans[array[i] - 1] = i + 1 



print(" ".join(ans))


### FIXED CODE ###

n = int(input())
array = list(map(int, input().strip().split(" ")))
ans = [0]*n

for i in range(n):
    ans[array[i] - 1] = str(i + 1 )



print(" ".join(ans))
A, B = input().split()
a = int(A)
b = float(B)*100

print((A*B)//100)


### FIXED CODE ###

A, B = input().split()
a = int(A)
b = round(float(B)*100)

print((a*b)//100)
h, w = map(int, input().split())
a = [input().split() for i in range(h)]
for i in range(h):
  for j in range(w):
    a[i][j] == "snuke":
      print(chr(ord("A") + j) + str(i + 1))
      exit()

### FIXED CODE ###

w = []
for i in range(ord("A"), ord("Z") + 1):
  w.append(chr(i))
  
a, b = map(int, input().split())
for i in range(a):
  row = input().split()
  for j in range(b):
    if row[j] == "snuke":
      print(w[j] + str(i + 1))
#数直線を切り分ける
#
# 1 2 3  7 20   2




def f(start, cuts):
    if cuts == 0:
        if start > M - 1:
            return 0
        else:
            return X[M - 1] - X[start]
        # 一回も切れないなら全長を返す
    else:
        minscr = 10e6
        for s in range(start, M):
            scr = X[s] - X[start] + f(s + 1, cuts - 1)
            if scr < minscr:
                minscr = scr
        if(minscr == 10e6):
            return 0
        return minscr

N, M = input().split()
N, M = int(N), int(M)
X = input().split()
X = [int(n) for n in X]
X = sorted(X)

best_cut = []
best_hands = 10e6


print(f(0, N - 1))

### FIXED CODE ###

def main():
    N, M = [int(n) for n in input().split()]
    X = [int(n) for n in input().split()]
    X.sort()
    diffs = [X[i+1]-X[i] for i in range(M-1)] # diffs[i]:=X[i+1]-X[i]
    diffs.sort(reverse=True)
    # print(diffs)
    cut = sum(diffs[:N-1])
    # print(cut)
    print(X[-1] - X[0] - cut)

if __name__ == "__main__":
    main()
N = int(input())
M = [list(map(int, input().split())) for _ in range(N-1)]

for i in range(N-1):
    tm = 0 #時刻を表す
    for j in range(i, N-1):
        if tm < M[j][1]: #開通していない
            tm = M[j][1]
        elif tm % M[j][2] != 0: #発車していない
            tm += M[j][2] - (tm % M[j][2])
 
        tm += M[j][0]
 
    print(tm)
print(0)

### FIXED CODE ###

print(48 - int(input()))
import sys

lines = sys.stdin.readlines()

H, M = list(map(int, lines[0].split()))
AB = []

max_at = 0
min_mg = 999999
at_min_mg = 0
for i in range(M):
  t = tuple(map(int, lines[i+1].split()))
  AB.append(t)
  if t[0]>max_at:
    max_at = t[0]
  if t[1]<min_mg:
    min_mg = t[1]
    at_min_mg = t[0]

ABlen = len(AB)

DP = [0]
for i in range(1, at_min_mg+1):
  DP.append(min_mg)
  
for i in range(at_min_mg+1,H+max_at):
  mm = 999999
  for j in range(ABlen):
    if i-AB[j][0]<0:
      continue
    if mm > DP[i-AB[j][0]]+AB[j][1]:
      mm = DP[i-AB[j][0]]+AB[j][1]
  DP.append(mm)
print(min(DP[H:H+max_at-1]))

### FIXED CODE ###

import sys

lines = sys.stdin.readlines()

H, M = list(map(int, lines[0].split()))
AB = []

max_at = 0
min_mg = sys.maxsize
at_min_mg = 0
for i in range(M):
  t = tuple(map(int, lines[i+1].split()))
  AB.append(t)
  if t[0]>=max_at:
    max_at = t[0]
  if t[1]<=min_mg:
    min_mg = t[1]
    at_min_mg = t[0]

ABlen = len(AB)

DP = [0]
for i in range(1, at_min_mg+1):
  DP.append(min_mg)
  
for i in range(at_min_mg+1,H+max_at+1):
  mm = sys.maxsize
  for j in range(ABlen):
    if i-AB[j][0]<0:
      continue
    if mm > DP[i-AB[j][0]]+AB[j][1]:
      mm = DP[i-AB[j][0]]+AB[j][1]
  DP.append(mm)
print(min(DP[H:H+max_at]))
def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    a.sort()
    if a[0]==a[1]:
        print(0)
        exit()
    f=[0]*(int(1e6)+1)
    ans=0
    for i in range(n):
        if f[a[i]]==0:
            ans+=1
            j=a[i]
            while j<=(int(1e6)):
                f[j]+=1
                j+=a[i]
    print(ans)
resolve()


### FIXED CODE ###

def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    a.sort()
    M=int(1e6+1)
    f=[0]*M
    for x in a:
        if f[x]!=0:
            f[x]+=1
            continue
        for nx in range(x,M,x):
            f[nx]+=1
    ans=0
    for x in a:
        if f[x]==1:ans+=1
    print(ans)
resolve()
N = input()
N = int(N)

a_sub = input().split(" ")
a = [int(n0) for n0 in a_sub]
# print(a)

b_sub = input().split(" ")
b = [int(n0) for n0 in b_sub]
# print(b)

c_sub = input().split(" ")
c = [int(n0) for n0 in c_sub]
# print(c)

score = 0
for xi in range(N):
    score = score + b[xi]
    if a[xi+1]==a[xi]+1 and xi<N:
        score = score + c[a[xi]-1]
        # print(xi, c[xi])

print(score)


### FIXED CODE ###

N = input()
N = int(N)
print(N**3)
S = int(input().split())
counter = 0
for _ in range (S[0],S[1]):
  if _ % S[2] == 0:
    counter += 1
  
print(counter)
    

### FIXED CODE ###

S = input().split()

counter = 0
for _ in range (int(S[0]),int(S[1])+1):
  if _ % int(S[2]) == 0:
    counter += 1
  
print(counter)
s = []
n, k = map(int, input().split())
for i in range(n):
	s.append(0)
for i in range(k):
	m = int(input())
    na = list(map(int, input().split())
    for j in na:
    	s[j - 1] = 1
         
print(s.count(0))
        

### FIXED CODE ###

s = []
n, k = map(int, input().split())
for i in range(n):
    s.append(0)
for i in range(k):
    m = int(input())
    na = list(map(int, input().split()))
    for j in na:
        s[j - 1] = 1
         
print(s.count(0))
N, T = map(int, input().split())
ct = [list(map(int, input().split()), idx+1) for idx in range(N)]

costs = list(filter(lambda x: x[1] <= T, ct))
if len(costs) == 0:
  print('TLE')
else:
  costs.sort(key=lambda x: x[0])
  print(costs[0][2])

### FIXED CODE ###

N, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(N)]
costs = list(filter(lambda x: x[1] <= T, ct))
if len(costs) == 0:
  print('TLE')
else:
  costs.sort(key=lambda x: x[0])
  print(costs[0][0])
n = int(input())
li = list(map(int,input().split()))	
ans_li =[]
ans_1 = 0
for i in range(n-1):
  if li[i] >= li[i+1]:
     ans_1 = ans_1 + 1
  elif li[i]<li[i+1]:
    ans_li.append(ans_1)
    ans_1 = 0
  if i == n-2:
    ans_li.append(ans_1)
print(max(ans_li))

### FIXED CODE ###

n = int(input())
li = list(map(int,input().split()))	
if n == 1:
  print("0")
else:
  ans_li =[]
  ans_1 = 0
  for i in range(n-1):
    if li[i] >= li[i+1]:
       ans_1 = ans_1 + 1
    elif li[i]<li[i+1]:
      ans_li.append(ans_1)
      ans_1 = 0
    if i == n-2:
      ans_li.append(ans_1)
  print(max(ans_li))
I = int(intpu())
print(I*I*I)


### FIXED CODE ###

I = int(input())
print(I*I*I)
S = input()
N = len(S)
A = (N-1)//2
B = ((N+2)//2)
if S[0:A] == [B:N]:
  print('Yes')
elif:
  print('No')

### FIXED CODE ###

S = input()
N = len(S)
A = (len(S) - 1) // 2
B = (len(S) + 3) // 2
if S[0:A] == S[B - 1:N]:
  print('Yes')
else:
  print('No')
import re

S=input()
ans = sorted((re.findall("[AGCT]*", S), reverse=True, key=len)
print(ans[0])

### FIXED CODE ###

S = str(input())
m=0
point=0
for i in S:
    if i == "A" or i == "G" or i == "C" or i == "T":
        point+=1
    else:
        point*=0
    m = max(m, point)
print(m)
a,b = map(int,input())
if a >= b:
  print(a)
else:
  print(b)


### FIXED CODE ###

a,b = map(int,input().split())
if a > b:
  print(a-1)
elif a == b:
  print(a)
else:
  print(a)
L, R=map(int, input().split())
mod=2019
A=[0]*(R-L+1)
for i in range(L, R+1):
  A[i-L]=i%mod
  
A=sorted(A)
print((A[0]*A[1])%mod)

### FIXED CODE ###

L,R=map(int, input().split())
#2019の倍数が入っていれば０→R-Lが２０１９以上
if R-L>=2019:
    print(0)
    exit()

ans=2019
for i in range(L,R):
    for j in range(i+1,R+1):
        ans=min(ans, (i*j)%2019)
print(ans)
A=int(input())
B=int(input())

if A,B=1,2:
  print("3")
if A,B=2,3:
  print("1")
if A,B=1,3:
  print("2")

### FIXED CODE ###

A=int(input())
B=int(input())
 
if A==1 and B==2:
  print("3")
if A==2 and B==3:
  print("1")
if A==1 and B==3:
  print("2")
if A==2 and B==1:
  print("3")
if A==3 and B==2:
  print("1")
if A==3 and B==1:
  print("2")
i = int(input())
S = []
while i > 0:
    S.append(i%10)
    i //= 10 # 必須
S.reverse()
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print('Bad')
else:
    print('Good')

### FIXED CODE ###

S = input()

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print('Bad')
else:
    print('Good')
import math
a = 0
b = 0
c = 0
d = 0
e = 0
ls = [a,b,c,d,e]
for i in range(len(ls)):
    ls[i] = int(input())
for i in ls:
    if i > 9:
        i = i//10
ans = 0
for i in ls:
    ans += math.ceil(i)

one = 0
lsls = []
for i in range(len(ls)):
    ls_one = str(ls[i])
    one += int(ls_one[-1])
    if int(ls_one[-1]) > 0:
    	lsls.append(10-int(ls_one[-1]))
    
lsls.remove(max(lsls))
print(ans+sum(lsls))

### FIXED CODE ###

import math
a = 0
b = 0
c = 0
d = 0
e = 0
ls = [a,b,c,d,e]
for i in range(len(ls)):
    ls[i] = int(input())
for i in ls:
    if i > 9:
        i = i//10
ans = 0
for i in ls:
    ans += math.ceil(i)

lsls = [0]
for i in range(len(ls)):
    ls_one = str(ls[i])
    if int(ls_one[-1]) > 0:
    	lsls.append(10-int(ls_one[-1]))
    
lsls.remove(max(lsls))
print(ans+sum(lsls))
n = input()
lines = input()
line = [int(i) for i in lines.split(' ')]
sum = 1
for i in line:
  if sum > 1.0 * 10^18:
    sum = -1
    break
   else:
    sum = sum * i
print(sum)


### FIXED CODE ###

n = input()
lines = input()
lines = [int(i) for i in lines.split(' ')]
sum = 1
if 0 in lines:
	print(0)
else:
	for i in lines:
		sum = sum * i
		if sum > 10**18:
			sum = -1
			break
	print(sum)
while True:
    h,w = map(int, input().split())
    if h == 0 and w == 0:
        break
    else:
        for i in range(h):
            if i == 0 or i == (h-1)
                print("#" * w)
            else:
                print("#" + "." * (w-2) + "#")
    print()


### FIXED CODE ###

#
# 5b
#

def main():
    while True:
        H, W = map(int, input().split())
        if H == W == 0:
            break
        for i in range(H):
            if i == 0 or i == H - 1:
                print("#" * W)
            else:
                print("#" + "." * (W-2) + "#")
        print()


if __name__ == '__main__':
    main()
a, b, n = map(int, input().split())
ans = 0
if b > n:
    ans = (a*n)//b
else:
    c = n//b
    max_c = [0]*(c+1)
    for i in range(1, c+1):
        max_c[i] = (a * (b*(i+1) - 1))//b - i
    print(max(max_c))

### FIXED CODE ###

a, b, n = map(int, input().split())
ans1 = (a*min(n, b-1))//b
ans2 = a*(min(n, b-1)//b)
print(ans1-ans2)
lines = input().split()
dists = []
for base, switch in zip(As[:-1], As[1:]):
    dists.append(switch - base)
dists.append(As[0]+(K-As[-1]))
print(K - max(dists))

### FIXED CODE ###

K, N = list(map(int, input().split()))
As = list(map(int, input().split()))
dists = []
for base, switch in zip(As[:-1], As[1:]):
    dists.append(switch - base)
dists.append(As[0]+(K-As[-1]))
print(K - max(dists))
n, m = map(int, input().split())
ship = []
for i in range(m):
    a, b = map(int, input().split())
    if a == 1 or b == n:
        ship.append((a, b))

ship.sort()
i = 0

while ship[i][0] == 1:
    i += 1

for j in range(i):
    for k in range(i, m):
        if ship[j][1] == ship[k][0]:
            print("POSSIBLE")
            exit()

print("IMPOSSIBLE")


### FIXED CODE ###

n, m = map(int, input().split())
ship_1 = [False]*(n+1)
ship_n = [False]*(n+1)
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        ship_1[b] = True
    elif b == n:
        ship_n[a] = True

for i in range(len(ship_1)):
    if ship_1[i] and ship_n[i]:
        print("POSSIBLE")
        exit()

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

    # divisors.sort()　#小さい順位欲しいとき
    return divisors

n=int(input())
a=sorted(list(map(int,input().split())))
dic={}
for k in a:
    if k in dic:
        dic[k]=0
        continue
    print(x)
    f=1
    for i in x:
        if i in dic:
            f=0
            break
    if f:
        dic[k]=1
print(sum(dic.values()))

### FIXED CODE ###

M=10**6+10
c=[0]*M
n=int(input())
a=sorted(list(map(int,input().split())))
for k in a:
    if c[k]:
        c[k]=2
        continue
    for i in range(k,M,k):
        c[i]+=1
ans=0
for i in a:
    if c[i]==1:
        ans+=1
print(ans)
K = int(input())
A,B = map(int, sys.stdin.readline().strip().split())

if B < K:
    print('NG')
    sys.exit()

if int(A + K - 1 / K) <= B:
    print('OK')
else:
    print('NG')


### FIXED CODE ###

import sys

K = int(input())
A,B = map(int, sys.stdin.readline().strip().split())

if A % K:
    i = (A // K) + 1
    ans = A <= (i * K) <= B
else:
    ans = A <= B

if ans:
    print('OK')
else:
    print('NG')
n = int(input())
s = []
for i in range(n):
    s.append(list(str(input())))

alphabet = set(s[0])

for i in range(1, n):
    alphabet = alphabet & set(s[i])

count_min = {}
for a in sorted(alphabet):
    count_min[a] = min(s[0].count(a))

ans = ""

for k, v in sorted(count_min.items()):
    for i in range(v):
        ans += k
print(ans)

### FIXED CODE ###

from collections import defaultdict

n = int(input())
s = []
for i in range(n):
    s.append(list(str(input())))

alphabet = set(s[0])

for i in range(1, n):
    alphabet = alphabet & set(s[i])

count_min = defaultdict(lambda: 10**9)
for a in sorted(alphabet):
    for i in range(n):
        count_min[a] = min(count_min[a], s[i].count(a))

ans = ""

for k, v in sorted(count_min.items()):
    for i in range(v):
        ans += k
print(ans)
N, Q = map(int, input().split())
connect = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    connect[a].append(b)
    connect[b].append(a)
score = [0] * N
for _ in range(Q):
    p, x = map(int, input().split())
    p -= 1
    score[p] += x

def dfs(now, prev = -1):
    for nx in connect[now]:
        if nx == prev: continue
        score[nx] += score[now]
        dfs(nx, now)

dfs(0)
print(*score)

### FIXED CODE ###

from collections import deque
 
N, Q = map(int, input().split())
Ki = [[] for _ in range(N)]
for _ in range(N-1):
    p, c = map(int, input().split())
    Ki[p-1].append(c-1)
    Ki[c-1].append(p-1)
S = [0]*N
for _ in range(Q):
    node, score = map(int, input().split())
    S[node-1] += score
 
stack = deque([0])
done = [0]*N
done[0] = 1
 
while len(stack) > 0:
    now = stack.pop()
    
    for new in Ki[now]:
        if done[new] == 0:
            done[new] = 1
            stack.append(new)
            S[new] += S[now]
    
print(*S)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)

s = [None] + list(input().rstrip("\n"))
len_s = len(s[1:])
t = list(input().rstrip("\n"))
len_t = len(t)

# s'からtが作れない場合
if (set(s[1:]) & set(t)) != set(t):
    print(-1)
    exit()

for i,x in enumerate(t):
    if i == len_t-1:
        tmp = [j for j,y in enumerate(s) if y == t[-1] and j > t[-2]]
        if tmp:
            t[i] = tmp[0]
        else:
            t[i] = s.index(x)
        break
    else:
        t[i] = s.index(x)

answer = 0
for i in range(len_t):
    if i == len_t-1:
        answer += t[-1]
        break
    if t[i] < t[i+1]:
        continue
    else:
        answer += len_s
    if answer > 10**100 * len_s:
        print(-1)
        exit()

if 1 <= answer <= 10**100 * len_s:
    print(answer)
else:
    print(-1)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from collections import defaultdict
from bisect import bisect_left


s = input().rstrip("\n")
len_s = len(s)
t = input().rstrip("\n")
len_t = len(t)

alpha = defaultdict(list)
for i in range(len_s):
    alpha[s[i]].append(i)

if not alpha[t[0]]:
    print(-1)
    exit()
else:
    now_index = alpha[t[0]][0]
    answer = now_index + 1

# O(|t|)
for i in range(1,len_t):
    index = alpha[t[i]]
    if not index:
        print(-1)
        exit()
    # O(log(index))
    next_index = bisect_left(index, now_index+1)
    # s[now_index+1:]にt[i]がある場合
    if next_index < len(index):
        answer += index[next_index] - now_index
        now_index = index[next_index]
    else:
        answer += (len_s -1) - now_index + (index[0] + 1)
        now_index = index[0]

print(answer)
n = int(input())
h = list(map(int, input().split()))
if n==1:
    print('Yes')
    exit()
for i in range(n-1):
    if h[n-i] == (h[n-i-1]-1):
        h[n-i-1] -= 1
    elif h[n-i] < (h[n-i-1]-1):
        print('No')
        exit()
print('Yes')

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
if n==1:
    print('Yes')
    exit()
ht = h[-1]
for i in reversed(range(n-1)):
    if ht == h[i]-1:
        h[i]-=1
    elif ht < h[i]-1:
        print('No')
        exit()
    ht = h[i]
print('Yes')
n = int(input())
x = [input().split() for i in range(n)]
ans = 0.0
for row in x:
  if row[1] == 'JPY'
    ans += float(row[0])
  else:
    ans += float(row[1]) * 380000
print(ans)

### FIXED CODE ###

n = int(input())
x = [input().split() for i in range(n)]
ans = 0.0
for row in x:
  if row[1] == 'JPY':
    ans += float(row[0])
  else:
    ans += float(row[0]) * 380000
print(ans)
import math
def cal(n ,r):
    if n == r:
        return 1
    return math.factorial(n)/(math.factorial(r) * math.factorial(n-r))

def bin_search(in_list, val):
    cnt = len(in_list)
    mid = int(round(cnt/2))
    if cnt == 1:
        return in_list[0]
    if in_list[mid] > val:
        return bin_search(in_list[:mid], val)
    if in_list[mid] < val:
        return bin_search(in_list[mid:], val)
    if in_list[mid] == val:
        return val

n = int(input())
A = sorted(list(map(int, input().split())))

m_combo = 0
ai = 0
aj = 0

for i in range(1,n):
    a = A[i]
    val = bin_search(A[:i], round(a/2))
    combo = cal(a, val)
    if combo > m_combo:
        m_combo = combo
        ai = a
        aj = val

print('{} {}'.format(ai, aj))


### FIXED CODE ###

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

ai = max(A)
A.remove(ai)

Asub = [abs(ai/2 -a) for a in A]
aj = A[Asub.index(min(Asub))]

print('{} {}'.format(ai, aj))
from collections import Counter
N = inr(input())
A = Counter([int(input()) for i in range(N)])
print(sum(1 if count%2 else 0 for count in A.values()))

### FIXED CODE ###

n = int(input())
d = {}
for i in range(n):
    a = int(input())
    if a in d:
        del d[a]
    else:
        d[a] = 1
print(len(d))