Harryxun/stf_run huggingface dataset:
import sys
n,y = map(int, input().split())

for a in range(n+1):
	for b in range(n+1):
	  if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y):
				print(str(a) + ' ' + str(b) + ' ' + str(c))
				sys.exit()

print('-1 -1 -1')
sys.exit()

### FIXED CODE ###

import sys

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

for a in range(n+1):
	for b in range(n+1-a):
		c = n - a - b
		if (a * 10000 + b * 5000 + c * 1000 == y):
				print(str(a) + ' ' + str(b) + ' ' + str(c))
				sys.exit()
	
print('-1 -1 -1')
sys.exit()
n,m=map(int,input().split())
def divisor_gen(n,m):
  l=[]
  o=[]
  for i in range(2, int(n*(1/2)+1):
    if n%i == 0:
      l.append(i)
  l.append(m)
  for i in l:
    if n>=m/i:
      o.append(i)
  print(max(o))
divisor_gen(n,m)


### FIXED CODE ###

def make_divisors(n,m):
    divisors = []
    for i in range(1,min(int(m**(1/2))+1,int(m//n)+1)):
      if m % i == 0:
          divisors.append(i)
          if i != m // i and m//i<=m//n:
              divisors.append(m//i)
    return divisors
n,m=map(int,input().split())
print(max(make_divisors(n,m)))
n, k = mapt(int, input().split(" "))
p = mapt(int, input().split(" "))
print(sum(sorted(p)[:3]))

### FIXED CODE ###

n, k = map(int, input().split(" "))
p = map(int, input().split(" "))
print(sum(sorted(p)[:k]))
n = int(input())
b = list(map(int, input().strip().split()))


num = 0
for j in range(100):
    count = 0
    for i in range(a):
        if b[i] % 2 == 0:
            count = 1 + count


    if count == a:
        b = [c/2 for c in b]
        num = 1 + num

print(num)

### FIXED CODE ###

n = int(input())
b = list(map(int, input().strip().split()))


num = 0
for j in range(100):
    count = 0
    for i in range(n):
        if b[i] % 2 == 0:
            count = 1 + count


    if count == n:
        b = [c/2 for c in b]
        num = 1 + num

print(num)
X = int(input())
Y = int(input())
Z = int(input())

A = X
B = Y
C = Z

X, Y = Y, X
Y, Z = Z, Y
print(A, B, C)

### FIXED CODE ###

X, Y, Z =map(int, input().split())
X, Y = Y, X
X, Z = Z, X


print(X, Y, Z)
# D - ModSum
import numpy as np
N = int(input())

N_1 = np.array(list(range(1, N+1)))
P_1 = np.array(list(range(2,N+1)))
P_1 = np.append(P_1, 1)

ans = sum(N_1 % P_1)
print(ans)

### FIXED CODE ###

# D - ModSum
N = int(input())

ans = (N*(N-1))//2
print(int(ans))
n = int(input())
ans = ""
while(n>0):
    r = n%26
    if r==0:
        r = 26
    ans = s[r] + ans
    n -= r
    n //=26

### FIXED CODE ###

s = "zabcdefghijklmnopqrstuvwxyz"
n = int(input())
ans = ""
while(n>0):
    r = n%26
    if r==0:
        r = 26
    ans = s[r] + ans
    n -= r
    n //=26
print(ans)
N,K = map(int,input().split(" "))
S = input()

tmp = S[K-1].lower()
S[K-1] = tmp
ans = "".join(S)

print(ans)

### FIXED CODE ###

N,K = map(int,input().split(" "))
S = list(input())

tmp = S[K-1].lower()
S[K-1] = tmp
ans = "".join(S)

print(ans)
n = int(input())
xy = [0] * n
for i in range(n):
    xy[i] = tuple([int(j) for j in input().split()])
loop = True
cnt = 0
while loop:
    xy_num = len(xy)
    for i in xy:
        a, b = i
        for j in xy:
            if j[0] == a and j[1] != b:
                d = j[1]
                for k in xy:
                    if k[1] == b and k[0] != a:
                        c = k[0]
                        if (c, d) not in xy:
                            xy.append((c, d))
                            cnt += 1
                    if k[1] == d and k[0] != a:
                        c = k[0]
                        if (c, b) not in xy:
                            xy.append((c, b))
                            cnt += 1
            if j[1] == b:
                c = j[0]
                for k in xy:
                    if k[0] == c and k[1] != b:
                        d = k[1]
                        if (a, d) not in xy:
                            xy.append((a, d))
                            cnt += 1
    if len(xy) == xy_num:
        loop = False
print(cnt)


### FIXED CODE ###

s = input()
b = ''
for i in s:
  if i == b:
    print('Bad')
    exit()
  b = i
print('Good')
import itertools
import heapq
import sys
import functools
import operator
import numpy as np
input = sys.stdin.readline
#-------------
n,k = map(int,input().split())
a = list(map(int,input().split()))
#-------------
a.sort(reverse = True)
w = 10**9 + 7
ans = 1
if k%2 == 1:#kは奇数
  for i in range(k):
    ans *= a[i]
  print(ans % w)

else:#kは偶数
  if n%2 == 0:#nは偶数
    for i in range(k):
      ans *= a_new[i]
    print(ans % w)
      
  else:#nは奇数
    a_plus =[]
    a_minus = []
    for i in range(n):
      if a[i] >= 0 :
        a_plus.append(a[i])
      else:
        a_minus.append(a[i])
    a_plus.sort(reverse = True)
    a_minus.sort()
    a_plus_new = [a_plus[2*i]*a_plus[2*i+1] for i in range(len(a_plus)//2)]
    a_minus_new = [a_minus[2*i]*a_minus[2*i+1] for i in range(len(a_minus)//2)]
    a_new = a_plus_new + a_minus_new
    a_new.sort(reverse = True)
    for j in range(k//2):
      ans *= a_new[j]
    print(ans % w)

### FIXED CODE ###

import sys
 
n, k = map(int, input().split())
a = [int(x) for x in input().split()]
mod = pow(10, 9)+7
zero = 0
plus = []
minus = []
for i in range(n):
  if a[i] == 0:
    zero += 1
  elif a[i] > 0:
    plus.append(a[i])
  else:
    minus.append(a[i])
 
P, M = len(plus), len(minus)
plus.sort(reverse=True)
minus.sort()
ans = 1
if n == k:
  for i in range(n):
    ans *= a[i]
    ans %= mod
elif P+M < k:
  ans = 0
elif P == 0:
  if zero and k%2:
    ans = 0
  else:
    if k%2:
      minus.reverse()
    for i in range(k):
      ans *= minus[i]
      ans %= mod
else:
  q = 0
  if k%2:
    ans *= plus[0]
    ans %= mod
    q = 1
  judge = []
  for i in range((len(plus)-q)//2):
    judge.append(plus[2*i+q]*plus[2*i+q+1])
  for i in range(len(minus)//2):
    judge.append(minus[2*i]*minus[2*i+1])
  judge.sort(reverse=True)
  for i in range(k//2):
    ans *= (judge[i]%mod)
    ans %= mod
 
print(ans)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np


def solve(S):
    dp = [0] * 2019
    pow10 = 1
    answer = 0
    for x in S[::-1]:
        dp[0] += 1
        x = x * pow10 % 2019
        newdp = np.zeros_like(dp)
        for i in range(x, 2019):
            newdp[x+i] += dp[i]
        for i in range(x):
            newdp[i] += dp[2019-x+i]
        answer += newdp[0]
        pow10 *= 10
        pow10 %= 2019
        dp = newdp
    return answer


S = [x - ord('0') for x in read().rstrip()]
print(solve(S))


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
from numba import njit

@njit('(i4[:],)')
def solve(S):
    dp = np.zeros(2019, np.int64)
    pow10 = 1
    answer = 0
    for x in S[::-1]:
        dp[0] += 1
        x = x * pow10 % 2019
        newdp = np.zeros_like(dp)
        newdp[x:] += dp[:-x]
        newdp[:x] += dp[-x:]
        answer += newdp[0]
        pow10 *= 10
        pow10 %= 2019
        dp = newdp
    return answer


S = np.array(list(read().rstrip()), dtype=np.int32) - ord('0')
print(solve(S))
#標準入力からソートまで
import numpy as np
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
A = np.array(A)
#Aの中で一番でかいのをdiscountしてまた並び替え
import bisect
for i in range(M):
    tmp = A.pop(N-1) // 2
    if A[N-2] <= tmp:
        A.append(tmp)
    else:
        bisect.insort_left(A, tmp)
print(sum(A))

### FIXED CODE ###

#標準入力からソートまで
N, M = map(int, input().split())
A = list(map(lambda x : int(x) * (-1), input().split()))
#Aの中で一番でかいのをdiscountしてまた並び替え
#優先度付きqueuemを使う
import heapq
heapq.heapify(A)
for i in range(M):
    tmp = (-1) * heapq.heappop(A) // 2
    heapq.heappush(A, tmp * (-1))
print(-sum(A))
import math
A, B, H, M = map(int, input().split())

degA = H * 30 + M * 0.5
degB = M * 6
deg = math.radians(degA-degB)
print(math.sqrt(A**2 + B**2 - 2*A*B*math.cos(deg)))

### FIXED CODE ###

N = input()

last = list(N)[-1]
if int(last) in (2,4,5,7,9):
    print('hon')
elif int(last) in (0,1,6,8):
    print('pon')
else:
    print('bon')
a = list(input().split)
a = set()
print(len(a))

### FIXED CODE ###

a = list(map(int,input().split()))
a = set(a)
print(len(a))
a=input()
b=input()
c={}
state=True
for i in range(len(a)):
  b[i] not in c:
    c[b[i]]=a[i]
    c[a[i]]=b[i]
  if c[b[i]]!=a[i]:
    state=False
if state:
  print('Yes')
else:
  print('No')
    
  

### FIXED CODE ###

a=input()
b=input()
c={}
state=True
for i in range(len(a)):
  if b[i] not in c and a[i] not in c.values():
    c[b[i]]=a[i]
  if b[i] in c:
    if c[b[i]]!=a[i]:
      state=False
  else:
    state=False
if state:
  print('Yes')
else:
  print('No')
from collections import deque

n,m=map(int,input().split())
step=list(range(2,n+1))
broken=[]
for i in range(m):
    broken+=[int(input())]
mod=10**9+7
dp=[0]*(n+1)
dp[0]=1
if m==0:
    dp[1]=1
elif not broken[0]==1:
    dp[1]=1
b=deque(broken)
bad_one = b.popleft()
for i in step:
    if i != bad_one:
        dp[i]=(dp[i-1]+dp[i-2])%mod
    elif i == bad_one and len(b) != 0:
        bad_one = b.popleft()
print(dp[n])

### FIXED CODE ###

N, M = list(map(int, input().split()))
A = {i: 0 for i in range(N+1)}
mod = 10 ** 9 + 7
for _ in range(M):
    A[int(input())] = 1
 
dp = [0 for _ in range(N+1)]
dp[0] = 1
 
for i in range(N+1):
    if A.get(i+1) == 0:
        dp[i + 1] += dp[i]
    if A.get(i+2) == 0:
        dp[i + 2] += dp[i]
 
print(dp[N]%mod)
n=int(input())
while True:
  if n==0:
    break
  x=[0 for i in range(7)]
  for i in range(n):
    a=int(input())
    if 0<=a<10:
      x[0]+=1
    elif 10<=a<20:
      x[1]+=1
    elif 20<=a<30:
      x[2]+=1
    elif 30<=a<40:
      x[3]+=1
    elif 40<=a<50:
      x[4]+=1 
    elif 50<=a<60:
      x[5]+=1
    else:
      x[6]+=1
  for i in range(7):
    if x[i]==0:
      print(0)
    else:
      print('{}'.format(x[i]))


### FIXED CODE ###

while True:
  x=[0 for i in range(7)]
  n=int(input())
  if n==0:
    break
  for i in range(n):
    a=int(input())
    if 0<=a<10:
      x[0]+=1
    elif 10<=a<20:
      x[1]+=1
    elif 20<=a<30:
      x[2]+=1
    elif 30<=a<40:
      x[3]+=1
    elif 40<=a<50:
      x[4]+=1 
    elif 50<=a<60:
      x[5]+=1
    else:
      x[6]+=1
  for i in range(7):
    print(x[i])
h, w = list(map(int, input().split() ))

s = []
s.append("." * (w+2)) 
for _ in range(h):
	s.append("." + input() + ".")
s.append("." * (w+2)) 

ans = "Yes"
dx = [-1, 0, 1, 0]
dy = [ 0, 1, 0,-1]

for i in range(1, h+1):
	for j in range(1, h+1):
		if s[i][j] == "#":
			CanPaint = False
			for k in range(4):
				if s[i+dx[k]][j+dy5 5
#.#.#
.#.#.
#.#.#
.#.#.
#.#.#[k]] == "#":
					CanPaint = True
			if not CanPaint:
				ans = "No"

print(ans)


### FIXED CODE ###

h, w = list(map(int, input().split() ))

s = []
s.append("." * (w+2)) 
for _ in range(h):
	s.append("." + input() + ".")
s.append("." * (w+2)) 

ans = "Yes"
dx = [-1, 0, 1, 0]
dy = [ 0, 1, 0,-1]

for i in range(1, h+1):
	for j in range(1, w+1):
		if s[i][j] == "#":
			CanPaint = False
			for k in range(4):
				if s[i+dx[k]][j+dy[k]] == "#":
					CanPaint = True
			if not CanPaint:
				ans = "No"

print(ans)
from __future__ import division
import math

def cross(p1,p2):
    a,b,c,d=p1[0],p1[1],p2[0],p2[1]
    t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
    alpha=4*(pow(b-d,2)+pow(c-a,2))
    beta=4*(t*(b-d)-2*b*pow(c-a,2))
    gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
    judge=pow(beta,2)-4*alpha*gamma
    if judge>0:
        y1,y2=1,1
#        y1=(-beta+math.sqrt(judge))/(2*alpha)
#        y2=(-beta-math.sqrt(judge))/(2*alpha)
        x1=(2*(b-d)*y1+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        x2=(2*(b-d)*y2+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x1,y1),(x2,y2))
    elif judge==0:
        y=-beta/(2*alpha)
        x=(2*(b-d)*y+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x,y),)
    else:
        return (-100,-100)

def maxNum(P,L):
    ans=1
    for x,y in P:
        cnt=0
        for px,py in L:
            d=math.sqrt(pow(px-x,2)+pow(py-y,2))
            if d<=1:
                cnt+=1
        ans=max(ans,cnt)
    return ans

while True:
    n=input()
    if n==0:break
    L=[map(float,raw_input().split(",")) for i in range(n)]
    P=[]
    for i in range(n-1):
        for j in range(i+1,n):
            points=cross(L[i],L[j])
            if points!=(-100,-100):
                P.extend(points)
    print maxNum(P,L)

### FIXED CODE ###

from __future__ import division
import math

def cross(p1,p2):
    a,b,c,d=p1[0],p1[1],p2[0],p2[1]
    t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
    alpha=4*(pow(b-d,2)+pow(c-a,2))
    beta=4*(t*(b-d)-2*b*pow(c-a,2))
    gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
    judge=pow(beta,2)-4*alpha*gamma
    EPS=1e-5
    if c==a:
        y=(pow(a,2)+pow(b,2)-pow(c,2)-pow(d,2))/(2*(b-d))
        bd=pow(b-d,2)
        a1=4*bd
        b1=-8*a*bd
        c1=4*a*a*bd+pow(a*a-b*b-c*c-d*d+2*b*d,2)-4*bd
        inroot=pow(b1,2)-4*a1*c1
        if inroot<0:
            return None
        x1=(-b1+math.sqrt(inroot))/(2*a1)
        x2=(-b1-math.sqrt(inroot))/(2*a1)
        return ((x1,y),(x2,y))

    if judge>EPS:
        y1=(-beta+math.sqrt(judge))/(2*alpha)
        y2=(-beta-math.sqrt(judge))/(2*alpha)
        x1=(2*(b-d)*y1+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        x2=(2*(b-d)*y2+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x1,y1),(x2,y2))
    elif -EPS<=judge<=EPS:
        y=-beta/(2*alpha)
        x=(2*(b-d)*y+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x,y),)
    else:
        return None

def maxNum(P,L):
    ans=1
    for x,y in P:
        cnt=0
        for px,py in L:
            d=math.sqrt(pow(px-x,2)+pow(py-y,2))
            if d<=1:
                cnt+=1
        ans=max(ans,cnt)
    return ans

while True:
    n=input()
    if n==0:break
    L=[map(float,raw_input().split(",")) for i in range(n)]
    P=[]
    for i in range(n-1):
        for j in range(i+1,n):
            points=cross(L[i],L[j])
            if points:
                P.extend(points)
    print maxNum(P,L)
n,m=map(int,input().split())
l1=list(input())
l=[]
lm=[]
c=0
d=l1[0]
for i in l1:
  if i==d:
    c+=1
  else:
    d=i
    l.append(c)
    c=1
l.append(c)
if l1[0]=="1":
  if len(l)//2<=m:
    print(n)
  else:
    j=0
    for i in range((len(l)-2*m-1)//2+1):
      lm.append(sum(l[j:j+2*m])+l[j+2*m])
      j+=2
      if j+2*m+1>len(l):
        break
    print(max(lm))
else:
  if (len(l)+1)//2<=m:
    print(n)
  else:
    j=1
    for i in range((len(l)-2*m-2)//2+1):
      lm.append(sum(l[j:j+2*m])+l[j+2*m])
      j+=2
      if j+2*m+1>len(l):
        break
    print(max(lm))

### FIXED CODE ###

n,k=map(int,input().split())
l=input()
b=True
if l[0]=="1":
  b=True
else:
  b=False
l1=[]
c=1
l11=l[0]
for i in range(1,len(l)):
  if l[i]!=l[i-1]:
    l1.append(c)
    c=1
  else:
    c+=1
l1.append(c)
if b:
  if k>=len(l1)//2:
    print(n)
  else:
    l2=[]
    c1=0
    for i in range(0,(len(l1)//2)):
      c1+=l1[i*2+1]+l1[i*2]
      l2.append(c1)
    if len(l1)%2==1:
      c2=l2[k-1]+l1[2*k]
      for j in range(k,len(l2)):
        c3=l2[j]-l2[j-k]+l1[2*(j+1)]
        if c3>c2:
          c2=c3
      print(c2)
    else:
      c2=l2[k-1]+l1[2*k]
      for j in range(k,len(l2)-1):
        c3=l2[j]-l2[j-k]+l1[2*(j+1)]
        if c3>c2:
          c2=c3
      c3=l2[-1]-l2[-1-k]
      if c3>c2:
        c2=c3
      print(c2)
else:
  if k>=(len(l1)//2)+1:
    print(n)
  else:
    l2=[l1[0]]
    c1=l1[0]
    if len(l1)%2==1:
      for i in range(1,(len(l1)//2)+1):
        c1+=l1[2*i]+l1[2*i-1]
        l2.append(c1)
      c2=l2[k-1]+l1[2*k-1]
      for i in range(k,len(l2)-1):
        c3=l2[i]-l2[i-k]+l1[i*2+1]
        if c3>c2:
          c2=c3
      c3=l2[len(l2)-1]-l2[len(l2)-1-k]
      if c3>c2:
        c2=c3
      print(c2)
    else:
      for i in range(1,(len(l1)//2)):
        c1+=l1[2*i]+l1[2*i-1]
        l2.append(c1)
      c2=l2[k-1]+l1[2*k-1]
      for i in range(k,len(l2)):
        c3=l2[i]-l2[i-k]+l1[i*2+1]
        if c3>c2:
          c2=c3
      print(c2)
MOD = 10**9 + 7

L = input()

p = [0] * (len(L)+1)
p[0] = 1
for i in range(1, len(L)+1):
    p[i] = p[i-1] * 2 % MOD

ans = 1
tmp  = 0
for i in range(len(L)+1):
    tmp += p[i] * 2 % MOD
ans += p[tmp]

#ans = p[len(L)-1]
#isAllBit = True
#for i in range(len(L)-1, 0, -1):
#    if isAllBit and L[i] == '1':
#        ans += p[len(L)-1-i]
#        ans %= MOD

ans =+ (p[len(L)-1] - 1) * 2
ans %= MOD
if L.count('1') == len(L):
    ans += (p[len(L)] - 1) * 2
    ans %= MOD

print(ans)


### FIXED CODE ###

L = input()

MOD = 10**9 + 7

d = [0] * len(L)
in_d = [0] * len(L)

for i in range(len(L)):
    if i == 0:
        d[i] = 1
        in_d[i] = 2
        continue

    # (0, 0), (0, 1), (1, 0)
    if L[i] == '1':
        d[i] = (d[i-1]*3 + in_d[i-1]*1) % MOD
        in_d[i] = in_d[i-1]*2 % MOD
    else:
        d[i] = d[i-1]*3 % MOD
        in_d[i] = in_d[i-1]*1 % MOD

d[-1] = (d[-1] + in_d[-1]) % MOD
print(d[-1])
import sys;input=sys.stdin.readline
from bisect import*

n,q=map(int,input().split())
event=[]
stopped=set([-1])

def doevent(l):
    global stopped
    if l[1]==1:
        if stopped=={-1}:
            stopped=set()
        stopped.add(l[2])
    elif l[1]==-1:
        stopped.remove(l[2])
        if len(stopped)==0:
            stopped={-1}
            
for i in range(n):
    s,t,x=map(int,input().split())
    event.append((s-x,1,x))
    event.append((t-x,-1,x))
event.append((-float("inf"),"x","x"))
event.append((float("inf"),"x","x"))
event.sort(key=lambda x:x[0])
eventtime=[i[0]for i in event]
#print(eventtime)
query=[bisect_right(eventtime,int(input()))-1 for i in range(q)]+[float("inf")]*100
#print(query)
c=0
#print(event)
for i in range(2*n+1):
    doevent(event[i])
    while i==query[c]:
        print(min(stopped))
        c+=1

### FIXED CODE ###

import sys;input=sys.stdin.readline

n,q=map(int, input().split())
event=[]
for _ in range(n):
    s,t,x=map(int,input().split())
    event.append((s-x-0.5,1,x))
    event.append((t-x-0.5,-1,x))
for i in range(q):
    event.append((int(input()),0,i))
    
event.sort()
is_stop=False
stop=set()
minstop=float('inf')
ans=[-1]*q
for t,e,x in event:
    if e > 0:
        stop.add(x)
        if x<minstop:
            minstop=x
            is_stop=True
    elif e<0:
        stop.remove(x)
        if minstop==x:
            is_stop=False
    elif len(stop)>0:
        if not is_stop:
             minstop=min(stop)
             is_stop=True
        ans[x]=minstop
        
print('\n'.join(map(str, ans)))
g = {}
n=int(input())
m = [-1]*n

def dfs(graph,node,height):
    global m
    global zeros
    global ones
    m[node-1]=height
    if height==0:
      zeros+=1
    if height==1:
      ones+=1
    for n in graph[node]:
      if m[n-1]==-1:
        dfs(graph,n,1-height)

zeros=0
ones=0
for i in range(n-1):
  a,b=map(int,input().split())
  if not a in g:
    g[a]=[b]
  else:
    g[a].append(b)
  if not b in g:
    g[b]=[a]
  else:
    g[b].append(a)
dfs(g,1,0)
print(1)

### FIXED CODE ###

g = {}
n=int(input())
m = [-1]*n
import sys
sys.setrecursionlimit(1000000000)
def dfs(graph,node,height):
    global m
    global zeros
    global ones
    m[node-1]=height
    if height==0:
      zeros+=1
    if height==1:
      ones+=1
    for n in graph[node]:
      if m[n-1]==-1:
        dfs(graph,n,1-height)

zeros=0
ones=0
for i in range(n-1):
  a,b=map(int,input().split())
  if not a in g:
    g[a]=[b]
  else:
    g[a].append(b)
  if not b in g:
    g[b]=[a]
  else:
    g[b].append(a)
dfs(g,1,0)
ans=[0]*n
used=[0]*n
r=n//3
if 3*(r+1)<=n:
  r+=1
if zeros<=r:
  current=3
  for i in range(n):
    if m[i]==0:
      ans[i]=current
      used[current-1]=1
      current+=3
  counter=0
  for i in range(n):
    if m[i]==1:
      while True:
        if used[counter]==0:
          ans[i]=counter+1
          counter+=1
          break
        counter+=1
elif ones<=r:
  current=3
  for i in range(n):
    if m[i]==1:
      ans[i]=current
      used[current-1]=1
      current+=3
  counter=0
  for i in range(n):
    if m[i]==0:
      while True:
        if used[counter]==0:
          ans[i]=counter+1
          counter+=1
          break
        counter+=1
else:
  if zeros<ones:
    current=1
    for i in range(n):
      if m[i]==0:
        ans[i]=current
        used[current-1]=1
        current+=3
        if current>n:
          current=3
    counter=0
    for i in range(n):
      if m[i]==1:
        while True:
          if used[counter]==0:
            ans[i]=counter+1
            counter+=1
            break
          counter+=1
  else:
    current=1
    for i in range(n):
      if m[i]==1:
        ans[i]=current
        used[current-1]=1
        current+=3
        if current>n:
          current=3
      counter=0
    for i in range(n):
      if m[i]==0:
        while True:
          if used[counter]==0:
            ans[i]=counter+1
            counter+=1
            break
          counter+=1
for i in ans:
  print(i)
n,s=input().split()

print(s.count('ABC'))

### FIXED CODE ###

n=input()
s=input()

print(s.count('ABC'))
s=input()
nall=len(s)
nzero=s.count("0")
none=nall-nzero
if n==0:
    print(0)
elif none<=nzero:
    print(nall-none*2)
else:
    print(nall-nzero*2)


### FIXED CODE ###

s=input()
nall=len(s)
nzero=s.count("0")
none=nall-nzero
if nall==0:
    print(0)
elif none<=nzero:
    print(none*2)
else:
    print(nzero*2)
N,K=map(int,input().split())
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result
if N==2:
    print(-1)
    break
if K>cmb(N-1,2):
    print(-1)
else:
    count=cmb(N-1,2)-K
    print(cmb(N,2)-K)
    for i in range(2,N+1):
        print(1,i)

    for i in range(2,N):
        for j in range(i+1,N+1):
            if count==0:
                exit()
            print(i,j)
            count-=1


### FIXED CODE ###

N,K=map(int,input().split())
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result
if N==2 and K>=1:
    print(-1)
    exit()
if K>cmb(N-1,2):
    print(-1)
else:
    count=cmb(N-1,2)-K
    print(cmb(N,2)-K)
    for i in range(2,N+1):
        print(1,i)

    for i in range(2,N):
        for j in range(i+1,N+1):
            if count==0:
                exit()
            print(i,j)
            count-=1
r=input()
print(int(r＊＊2))

### FIXED CODE ###

r=int(input())
print(r**2)
N = int(input())
H = list(map(int, input().split()))
ans = []
count = 0
for i in range(len(H)-1):
  if H[i] >= H[i+1]:
    count += 1
  else:
    ans.append(count)
    count = 0
print(max(ans))

### FIXED CODE ###

def resolve():
    N = int(input())
    H = list(map(int, input().split()))
    ans = [0]
    count = 0
    for i in range(len(H) - 1):
        if H[i] >= H[i + 1]:
            count += 1
        else:
            ans.append(count)
            count = 0
    if count != 0:
        ans.append(count)
    print(max(ans))
resolve()