Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

n = int(input())
a = list(map(int, input().split()))
divide_minimam_prime = [i for i in range(max(a) + 1)]
is_prime = [True for i in range(max(a) + 1)]
is_prime[0] = False
is_prime[1] = False
for div in range(2,int(max(a)**0.5) + 1):
    if is_prime[div]:
        # divが素数だった場合
        k = div
        divide_minimam_prime[k] = k
        k += div
        while k <= max(a):
            is_prime[k] = False
            if divide_minimam_prime[k] == k:
                divide_minimam_prime[k] = div
            k += div
# pairwise coprimeであるかどうか？
pairwise_coprime = True
use_divnum = set()
for i in range(n):
    k = a[i]
    while k != 1:
        if divide_minimam_prime[k] in use_divnum:
            pairwise_coprime = False
            break
        else:
            use_divnum.add(divide_minimam_prime[k])
        div = divide_minimam_prime[k]
        while k % divide_minimam_prime[k] == 0 and k > 1:
            k = k // div
if pairwise_coprime: 
    print("pairwise coprime")
    exit()
from math import gcd
gcd_of_a = a[0]
for i in range(n):
    gcd_of_a = gcd(gcd_of_a, a[i])
if gcd_of_a == 1:
    print("setwise coprime")
else:
    print("not coprime")

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
MAX_A = max(a)
divide_minimam_prime = [i for i in range(MAX_A + 1)]
is_prime = [True for i in range(MAX_A + 1)]
is_prime[0] = False
is_prime[1] = False
for div in range(2,int(MAX_A**0.5) + 1):
    if is_prime[div]:
        # divが素数だった場合
        k = div
        divide_minimam_prime[k] = k
        k += div
        while k <= MAX_A:
            is_prime[k] = False
            if divide_minimam_prime[k] == k:
                divide_minimam_prime[k] = div
            k += div
# pairwise coprimeであるかどうか？
pairwise_coprime = True
use_divnum = set()
for i in range(n):
    k = a[i]
    while k != 1:
        if divide_minimam_prime[k] in use_divnum:
            pairwise_coprime = False
            break
        else:
            use_divnum.add(divide_minimam_prime[k])
        div = divide_minimam_prime[k]
        while k % div == 0 and k > 1:
            k = k // div
if pairwise_coprime: 
    print("pairwise coprime")
    exit()
from math import gcd
gcd_of_a = a[0]
for i in range(n):
    gcd_of_a = gcd(gcd_of_a, a[i])
if gcd_of_a == 1:
    print("setwise coprime")
else:
    print("not coprime")
### BUGGY CODE ###

import bisect
N = int(input())
L = sorted(list(map(int,input().split())))
lenl = len(L)
count = 0
for i in range(0,lenl-2):
    for j in range(i+1,lenl-1):
        count += bisect.bisect_left(L[j+1:],L[i]+L[j])
print(count)

### FIXED CODE ###

import bisect
N = int(input())
L = sorted(list(map(int,input().split())))
lenl = len(L)
count = 0
for i in range(0,lenl-2):
    for j in range(i+1,lenl-1):
        count += bisect.bisect_left(L,L[i]+L[j])-j-1
print(count)
### BUGGY CODE ###

n,a=map(int,input().split())
x=list(map(int,input().split()))
p=max(max(x),a)
s=[i-a for i in x]
def f(b,t):
    if b==0 and t==p*n:
        return 1
    elif b>0 and (t-s[b-1]<0 or t-s[b-1]>2*p*n):
        return f(b-1,t)
    elif b>0 and (0<=t-s[b-1] and t-s[b-1]<=2*p*n):
        return f(b-1,t)+f(b-1,t-s[b-1])
    else:
        return 0
print(f(n,n*p)-1)

### FIXED CODE ###

n,a=map(int,input().split())
x=list(map(int,input().split()))
p=max(max(x),a)
s=[i-a for i in x]
dp=[[0]*(2*n*p+1) for i in range(n+1)]
dp[0][n*p]=1
for i in range(1,n+1):
    for j in range(2*n*p+1):
        if j-s[i-1]<0 or j-s[i-1]>2*p*n:
            dp[i][j]=dp[i-1][j]
        else:
            dp[i][j]=dp[i-1][j]+dp[i-1][j-s[i-1]]
print(dp[n][n*p]-1)
### BUGGY CODE ###

#!/usr/bin/env python3
import math
Q = int(input())
for _ in range(Q):
    A, B, C, D = map(int, input().split())
    K = math.ceil(max(A, B) / (min(A, B) + 1))
    f = ''
    ca, cb = 0, 0
    while A + B > 0:
        if B <= A * K:
            if A > 0 and ca < K:
                A -= 1
                ca += 1
                cb = 0
                f += 'A'
            elif B > 0:
                B -= 1
                ca = 0
                cb += 1
                f += 'B'
        else:
            if B > 0 and cb < K:
                B -= 1
                ca = 0
                cb += 1
                f += 'B'
            elif A > 0:
                A -= 1
                ca += 1
                cb = 0
                f += 'A'
    print(f[C - 1:D])


### FIXED CODE ###

#!/usr/bin/env python3
import math
Q = int(input())
for _ in range(Q):
    A, B, C, D = map(int, input().split())
    K = math.ceil(max(A, B) / (min(A, B) + 1))
    lo, hi = 0, A + 1
    while hi - lo > 1:
        mid = (lo + hi) // 2
        rA, rB = A - mid, B - max(0, (mid - 1) // K)
        if (rA + 1) * K < rB:
            hi = mid
        else:
            lo = mid

    f = ''
    for i in range(C - 1, D):
        na = lo
        nb = max(0, (na - 1) // K)
        if i < nb * (K + 1):
            f += ('A', 'B')[i % (K + 1) == K]
        elif i < na + nb:
            f += 'A'
        else:
            j = A + B - i - 1
            nb = B - nb
            na = max(0, (nb - 1) // K)
            if j < na * (K + 1):
                f += ('B', 'A')[j % (K + 1) == K]
            else:
                f += 'B'
    print(f)
### BUGGY CODE ###

from functools import reduce

def gcd(m, n):
    r = m % n
    return gcd(n, r) if r else n

def mgcd(*a):
    return reduce(gcd, a)

k = int(input())
ans = 0
for i in range(1, k+1):
  for j in range(1, k+1):
    for l in range(1, k+1):
      ans += mgcd(i, j, l)

print(ans)

### FIXED CODE ###

from math import gcd

k=int(input())
ans=0
for i in range(1,k+1):
    for j in range(1,k+1):
        for m in range(1,k+1):
            ans += gcd(i, gcd(j,m))
print(ans)
### BUGGY CODE ###

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

ans = 0
for i in range(N):
  a = True
  for j in range(i):
    if P[i] <= P[j]:
      a = True
    else:
      a = False
      break
  if a == True:
    ans += 1

print(ans)

### FIXED CODE ###

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

ans = 0
m_P = P[0]
for i in range(N):
  if P[i] <= m_P:
    ans += 1
    m_P = P[i]
print(ans)
### BUGGY CODE ###

# ABC139
def main():
    N, *A = map(int, open(0).read().split())
    B = {}
    for i in range(N):
        x = i * (N - 1)
        B[i + 1] = A[x : x + N - 1]
    C = {i: 0 for i in range(1, N + 1)}
    ans, flg, matched = 0, 0, set()
    while C:
        for i in list(C.keys()):
            if i in C and i not in matched:
                x = B[i][C[i]]
                if x in B and x not in matched and B[x][C[x]] == i:
                    C[i] += 1
                    C[x] += 1
                    matched |= {i, x}
                    flg = 1
                    if C[i] == N - 1:
                        del C[i]
                    if C[x] == N - 1:
                        del C[x]
        if flg:
            ans += 1
            flg, matched = 0, set()
        else:
            print(-1)
            return
    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

# ABC139E - League
from collections import deque


def main():
    N, *A = map(int, open(0).read().split())
    B = {}
    for i in range(N):
        x = i * (N - 1)
        B[i + 1] = deque(A[x : x + N - 1])
    ans, cnt, matched = 0, 0, set()
    q = [i for i in range(1, N + 1)]
    while q:
        ans += 1
        next_q = []
        for i in q:
            if i in B and i not in matched:
                x = B[i][0]
                if x in B and x not in matched and B[x][0] == i:
                    B[i].popleft(), B[x].popleft()
                    matched |= {i, x}
                    cnt += 1
                    if not B[i]:
                        del B[i]
                    else:
                        next_q += [i]
                    if not B[x]:
                        del B[x]
                    else:
                        next_q += [x]
        q = next_q
        matched = set()
    flg = cnt == N * (N - 1) // 2
    print(ans if flg else -1)


if __name__ == "__main__":
    main()
### BUGGY CODE ###

import math
a,b,n = map(int, input().split())

ans = 0
for x in range(n+1):
    y = math.floor((a*x)/b) - a * math.floor(x/b)
    ans = max(y, ans)

print(ans)

### FIXED CODE ###

a,b,n=map(int,input().split())
x=min(b-1,n)
print((a*x)//b-a*(x//b))
### BUGGY CODE ###

# D - Friend Suggestions
from collections import deque
N,M,K = map(int,input().split())
friend = [set() for _ in range(N+1)]
block = [{i} for i in range(N+1)]
for _ in range(M):
    x,y = map(int,input().split())
    friend[x].add(y)
    friend[y].add(x)
for _ in range(K):
    x,y = map(int,input().split())
    block[x].add(y)
    block[y].add(x)
connect = [{i} for i in range(N+1)]
check = [0]*(N+1)
for i in range(1,N+1):
    if check[i]!=0:
        continue
    que = deque([i])
    con = {i}
    while len(que)>0:
        j = que.popleft()
        for x in friend[j]:
            if x not in con:
                que.append(x)
                con.add(x)
    for x in con:
        connect[x] = set(con)
        check[x] = 1
ans = [len(connect[i].difference(friend[i],block[i])) for i in range(1,N+1)]
print(*ans)

### FIXED CODE ###

# D - Friend Suggestions

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def root(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.root(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)

        if x == y:
            return
        
        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x
    
    def same(self, x, y):
        return self.root(x) == self.root(y)

    def size(self, x):
        return -self.parents[self.root(x)]

N,M,K = map(int,input().split())
friend = UnionFind(N+1)
block = [1]*(N+1)
for _ in range(M):
    x,y = map(int,input().split())
    block[x] += 1
    block[y] += 1
    friend.union(x,y)
for _ in range(K):
    x,y = map(int,input().split())
    if friend.same(x,y):
        block[x] += 1
        block[y] += 1
ans = [friend.size(i)-block[i] for i in range(1,N+1)]
print(*ans)
### BUGGY CODE ###

#C
N = int(input())
A = list(map(int, input().split()))
for i in range(1,N+1):
    k=A.count(i)
    print(k)

### FIXED CODE ###

import collections
N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
for i in range(1,N+1):
    print(c[i])
### BUGGY CODE ###

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

ans1 = max(a)

flag = True
if ans1 % 2 == 1:
    s1 = ans1 // 2
    s2 = ans1 // 2 + 1
else:
    if ans1 // 2 in a:
        flag = False
        ans2 = ans1 // 2
    else:
        s1 = ans1 // 2 - 1
        s2 = ans1 // 2 + 1

while flag:
    if s1 in a:
        ans2 = s1
        break
    elif s2 in a:
        ans2 = s2
        break
    s1 -= 1
    s2 += 1

print(ans1, ans2)


### FIXED CODE ###

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

ans1 = max(a)
sa = sorted(a)

if n == 2:
    ans1 = a[0]
    ans2 = a[1]
else:
    idx = n // 2
    flag = True
    if sa[idx] == ans1 // 2:
        ans2 = ans1 // 2
    elif sa[idx] < ans1 // 2:
        while True:
            idx += 1
            if ans1 // 2 <= sa[idx]:
                if abs(sa[idx] - ans1 / 2) < abs(sa[idx - 1] - ans1 / 2):
                    ans2 = sa[idx]
                else:
                    ans2 = sa[idx - 1]
                break
    else:
        while True:
            idx -= 1
            if sa[idx] <= ans1 // 2:
                if abs(sa[idx] - ans1 / 2) < abs(sa[idx + 1] - ans1 / 2):
                    ans2 = sa[idx]
                else:
                    ans2 = sa[idx + 1]
                break

print(ans1, ans2)
### BUGGY CODE ###

A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
oldp = 10**20
c = [[0 for _ in range(B)] for _ in range(A)]
for _ in range(M):
    x, y, cp = map(int,input().split())
    p = a[x-1]+b[y-1]-cp
    if oldp > p:
        oldp = p

p = min(a)+min(b)
print(min(oldp,p))

### FIXED CODE ###

A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

oldp = min(a)+min(b)

for _ in range(M):
    x, y, cp = map(int,input().split())
    p = a[x-1]+b[y-1]-cp
    if oldp > p:
        oldp = p

print(oldp)
### BUGGY CODE ###

N=int(input())
A = [list(map(int, input().split())) for i in range(N)]
result=0
flag=True
isbreak=False
for m in range(N-1):
    for n in range(m+1,N):
        list_t=list(range(N))
        list_t.remove(m)
        list_t.remove(n)
        for t in list_t:
            if A[m][n]>A[m][t]+A[t][n]:
                result=-1
                break
                isbreak=True
            elif A[m][n]==A[m][t]+A[t][n] and result!=-1:
                flag=False
        if flag and result!=-1:
            result+=A[m][n]
        else:
            flag=True
        if isbreak:
            break
    if isbreak:
        break
print(result)

### FIXED CODE ###

N=int(input())
A = [list(map(int, input().split())) for i in range(N)]
result=0
flag=True
isbreak=False
for m in range(N-1):
    for n in range(m+1,N):
        list_t=list(range(N))
        list_t.remove(m)
        list_t.remove(n)
        for t in list_t:
            if A[m][n]>A[m][t]+A[t][n]:
                result=-1                
                isbreak=True
                break
            elif A[m][n]==A[m][t]+A[t][n] and result!=-1:
                flag=False
                break
        if flag and result!=-1:
            result+=A[m][n]
        else:
            flag=True
        if isbreak:
            break
    if isbreak:
        break
print(result)
### BUGGY CODE ###

N, K = map(int, input().split())
h = list(map(int, input().split()))
dp_h = [0] * N
dp_h[1] = abs(h[1] - h[0])
for i in range(2,N):
  tmp_min = abs(h[i] -h[i-1]) + dp_h[i-1]
  for j in range(min(i-1, K-1)):
    tmp = abs(h[i] - h[i - j - 2]) + dp_h[i-j-2]
    if tmp < tmp_min:
      tmp_min = tmp
  dp_h[i] = tmp_min
print(dp_h[N-1])
    


### FIXED CODE ###

import numpy as np
N, K = map(int, input().split())
h = list(map(int, input().split()))
h = np.array(h)
dp = np.zeros(N, dtype = int)
for i in range(1, N):
  j = max(0,i - K)
  dp[i] = np.min(dp[j:i] + np.abs(h[i] - h[j:i]))
print(dp[N-1])
### BUGGY CODE ###

MOD = 10**9 + 7
MOD_t_MAX = 2*10**6 + 10

fac  = [None] * MOD_t_MAX
finv = [None] * MOD_t_MAX
inv  = [None] * MOD_t_MAX
def MOD_COM_init():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, MOD_t_MAX):
        fac[i] = fac[i - 1] * i % MOD
        inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
        finv[i] = finv[i - 1] * inv[i] % MOD
def MOD_COM(n, k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD

def main():
    k = int(input())
    s = input()
    n = len(s)
    MOD_COM_init()
    ans = 0
    pow_26 = [None]*(k+1)
    pow_25 = [None]*(k+1)
    pow_26[0] = 1
    pow_25[0] = 1
    for i in range(1, k+1):
        pow_26[i] = pow_26[i-1] * 26 % MOD
        pow_25[i] = pow_25[i-1] * 25 % MOD
    for i in range(k+1):
        x, y = i, k-i
        ans += pow_25[x] * MOD_COM(x + n-1, n-1) * pow_26[y] % MOD
    print(ans % MOD)

if __name__ == "__main__":
    main()

### FIXED CODE ###

MOD = 10**9 + 7
MOD_t_MAX = 2*10**6 + 10

fac  = [None] * MOD_t_MAX
finv = [None] * MOD_t_MAX
inv  = [None] * MOD_t_MAX
def MOD_COM_init():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, MOD_t_MAX):
        fac[i] = fac[i - 1] * i % MOD
        inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
        finv[i] = finv[i - 1] * inv[i] % MOD
def MOD_COM(n, k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD

def main():
    k = int(input())
    s = input()
    n = len(s)
    MOD_COM_init()
    ans = 0
    a = 1
    b = pow(26, k, MOD)
    for i in range(k+1):
        ans += a * MOD_COM(i + n-1, n-1) * b % MOD
        a *= 25
        b *= inv[26]
        a %= MOD
        b %= MOD
    print(ans % MOD)

if __name__ == "__main__":
    main()
### BUGGY CODE ###

S = list(map(str, input()))
Q = int(input())
f = 0
for i in range(Q):
  Query = input().split()
  if Query[0] == '1':
    f = 1 - f
  else:
    if int(Query[1]) - f == 1:
      S = [Query[2]] + S
    else:
      S = S + [Query[2]]
if f == 1:
  S.reverse()
print(''.join(S))

### FIXED CODE ###

from collections import deque
S = deque(input())
Q = int(input())
d = 0 # d=0:right, d=1:left
for i in range(Q):
  I = list(input().split())
  if I[0] == "1":
    d ^= 1
  else:
    if d + int(I[1]) == 2:
      S.append(I[2])
    else:
      S.appendleft(I[2])
if d == 1:
  S.reverse()
for s in S:
  print(s, end="")
print()
### BUGGY CODE ###

import collections
N = int(input())
D_list = list(map(int, input().split()))
mod = 998244353
ans = 1
count_dir = collections.Counter(D_list)
if max(D_list) >= N:
    ans = 0
else:
    for i in range(max(D_list) + 1):
        if i not in D_list:
            ans = 0
            break
        if i >= 2:
            ans *= count_dir[i-1]**count_dir[i]

if D_list[0] != 0 or count_dir[0] >= 2:
    ans = 0

print(ans%mod)

### FIXED CODE ###

N = int(input())
D_list = list(map(int, input().split()))
mod = 998244353
ans = 1
count_list = [0]*(max(D_list) + 1)
if max(D_list) >= N:
    ans = 0
else:
    for i in range(len(D_list)):
        count_list[D_list[i]] += 1
    if count_list[1] == 0:
        ans = 0
    else:
        for i in range(2, len(count_list)):
            if count_list[i] == 0:
                ans = 0
                break
            ans *= count_list[i-1]**count_list[i]

if D_list[0] != 0 or count_list[0] >= 2:
    ans = 0

print(ans%mod)
### BUGGY CODE ###

n,b,r=map(int,input().split())
alist=[]
count=0

while len(alist)<n:
  for i in range(b):
    alist.append('b')
  for i in range(r):
    alist.append('r')

del alist[n:]

for i in alist:
  if i=='b':
    count+=1

print(count)


### FIXED CODE ###

n,b,r=map(int,input().split())

ans=n//(b+r)*b
sur=n%(b+r)
ans+=min(sur,b)
print(ans)
### BUGGY CODE ###

H, W = list(map(int, input().split()))
S = [input() for _ in range(H)]

g = [".", "#"]
HL = [[0] * W for _ in range(H)]
HR = [[0] * W for _ in range(H)]

for i in range(H):
  l = 0
  r = 0
  for j in range(W):
    if S[i][j] == g[0]:
      l += 1
    else:
      l = 0
    HL[i][j] = l
    if S[i][W - 1 - j] == g[0]:
      r += 1
    else:
      r = 0
    HR[i][W - 1 - j] = r

WU = [[0] * W for _ in range(H)]
WD = [[0] * W for _ in range(H)]

for i in range(W):
  u = 0
  d = 0
  for j in range(H):
    if S[j][i] == g[0]:
      u += 1
    else:
      u = 0
    WU[j][i] = u
    if S[H - j - 1][i] == g[0]:
      d += 1
    else:
      d = 0
    WD[H - j - 1][i] = d

ans = 0

for i in range(H):
  for j in range(W):
    k = HL[i][j] + HR[i][j] + WU[i][j] + WD[i][j] - 3
    ans = max(ans, k)

print(ans)

### FIXED CODE ###

H, W = list(map(int, input().split()))
S = [input() for _ in range(H)]

g = [".", "#"]
HL = [[0] * W for _ in range(H)]
HR = [[0] * W for _ in range(H)]

for i in range(H):
  l = 0
  r = 0
  for j in range(W):
    if S[i][j] == g[0]:
      l += 1
    else:
      l = 0
    HL[i][j] = l
    if S[i][W - 1 - j] == g[0]:
      r += 1
    else:
      r = 0
    HR[i][W - 1 - j] = r

WU = [[0] * W for _ in range(H)]
WD = [[0] * W for _ in range(H)]

for i in range(W):
  u = 0
  d = 0
  for j in range(H):
    if S[j][i] == g[0]:
      u += 1
    else:
      u = 0
    WU[j][i] = u
    if S[H - j - 1][i] == g[0]:
      d += 1
    else:
      d = 0
    WD[H - j - 1][i] = d

ans = 0

for i in range(H):
  for j in range(W):
    k = HL[i][j] + HR[i][j] + WU[i][j] + WD[i][j] - 3
    ans = max(ans, k)

print(ans)
### BUGGY CODE ###

Q = int(input())


# 約数
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)
    return divisors
N = 5*10**4
acc = [0]*(N+1)
cnt = 0
for i in range(N+1):
    n1 = 2*i + 1
    n2 = i+1
    div1 = make_divisors(n1)
    div2 = make_divisors(n2)    
    if len(div1) == len(div2) == 2:
        cnt += 1
    acc[i] = cnt
# print(acc[:10])
for i in range(Q):
    l_,r_ = map(int, input().split())
    l = (l_-1)//2
    r = (r_-1)//2
    if l > 0:
        print(acc[r]-acc[l-1])
    else:
        print(acc[r])

### FIXED CODE ###

Q = int(input())


# 約数
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)
    return divisors
N = 5*10**4
acc = [0]*(N+1)
cnt = 0
for i in range(N+1):
    n1 = 2*i + 1
    n2 = i+1
    div1 = make_divisors(n1)
    div2 = make_divisors(n2)    
    if len(div1) == len(div2) == 2:
        cnt += 1
    acc[i] = cnt
# print(acc[:10])
for i in range(Q):
    l_,r_ = map(int, input().split())
    l = (l_-1)//2
    r = (r_-1)//2
    if l > 0:
        print(acc[r]-acc[l-1])
    else:
        print(acc[r])
### BUGGY CODE ###

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

ans = 0
now=0

for i in range(N):
    if now+1>=N:
        break
    _ans = 0
    if H[now]>=H[now+1]:
        for g in range(1145141919):
            if now+1+g>=N:
                break
            if H[now+g]>=H[now+1+g]:
                _ans+=1
            else:
                now+=g
                break
    else:
        now+=1
    ans = max(ans, _ans)

print(ans)

### FIXED CODE ###

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

ans = 0
now=0

for i in range(N):
    if now+1>=N:
        break
    _ans = 0
    if H[now]>=H[now+1]:
        for g in range(1145141919):
            if now+1+g>=N:
                now+=g+1
                break
            if H[now+g]>=H[now+1+g]:
                _ans+=1
            else:
                now+=g+1
                break
    else:
        now+=1
    ans = max(ans, _ans)

print(ans)
### BUGGY CODE ###

import collections

H,W,M = map(int, input().split())
hw = [list(map(int, input().split())) for _ in range(M)]
h = [h1 for h1,w1 in hw]
w = [w1 for h1,w1 in hw]
ch = collections.Counter(h).most_common()
mh = []
mnh = ch[0][1]
for ch1 in ch:
    if mnh == ch1[1]:
        mh.append(ch1[0])
        continue
    else:
        break
    break
cw = collections.Counter(w).most_common()
mw = []
mnw = cw[0][1]
for cw1 in cw:
    if mnw == cw1[1]:
        mw.append(cw1[0])
        continue
    else:
        break
    break
for h1 in mh:
    for w1 in mw:
        if [h1,w1] not in hw:
            print(mnh+mnw)
            exit()
print(mnh+mnw-1)

### FIXED CODE ###

from collections import defaultdict

H, W, M = map(int, input().split())
h = [0] * M
w = [0] * M

nh = [0] * H  # number of h == i+1
nw = [0] * W  # number of w == i+1
dic = defaultdict(bool)

for i in range(M):
    h[i], w[i] = map(int, input().split())
    h[i] -= 1
    w[i] -= 1
    nh[h[i]] += 1
    nw[w[i]] += 1
    dic["{}-{}".format(h[i],w[i])] = True

mnh = max(nh)
mnw = max(nw)

mh = [i for i, nh1 in enumerate(nh) if nh1 == mnh]
mw = [i for i, nw1 in enumerate(nw) if nw1 == mnw]

for h1 in mh:
    for w1 in mw:
        if not dic["{}-{}".format(h1,w1)]:
            print(mnh + mnw)
            exit()
print(mnh + mnw - 1)
### BUGGY CODE ###

import sys
input = sys.stdin.readline
 
K,S=map(int,input().split())
count=0
if 2<=K<=2500:
  if 0<=S<=3*K:
      for x in range(K+1):
        for y in range(K+1):
          for z in range(K+1):
            if z==S-x-y:
              count+=1
print(count)

### FIXED CODE ###

import sys
input = sys.stdin.readline
 
K,S=map(int,input().split())
count=0
for x in range(K+1):
    for y in range(K+1):
        if S-(x+y)>=0 and S-(x+y)<=K: count+=1
print(count)
### BUGGY CODE ###

n = int(input())
ans = n
s = []
for i in range(n):
    temp = input()
    if temp in s:
        ans = ans - 1
    else:
        s.append(temp)
print(ans)


### FIXED CODE ###

n = int(input())
ans = n
s = set()
for i in range(n):
    s.add(input())
print(len(s))