Harryxun/stf_run huggingface dataset:
import numpy as np
a=np.array([[0]*10]*12)
n=int(input())
for i in range(n):
    b,f,r,v=map(int,input().split())
    a[ 3*b-4+f, r-1 ] = v
for i in range(12):
    if i > 0 and i%3==0:
        print('#'*20)
    print(' '+*a[i,])

### FIXED CODE ###

towers = [
    [[0 for i in range(10)] for j in range(3)] for k in range(4)
]
floor = 3
 
n = int(input())
for i in range(n):
    b,f,r,v = list(map(int,input().split()))
    towers[b-1][f-1][r-1] += v
 
for b in towers:
    for f in b:
        for r in f:
            print(' ' + str(r), end='')
        print('')
    if floor:
        print('#'*20)
        floor -= 1
a,b,c,d=map(int,input().split())
if a==b:
  print("bad")
  else if b==c:
    print("bad")
    else if c==d:
      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")
#dfs
import sys
sys.setrecursionlimit(10 ** 7)

#dfs
M = int(input())
L = []
for i in range(M):
    d, c = map(int, input().split())
    L.extend([d] * c)

answer = 20

def dfs(count, l):
    global answer
    if len(l) == 1:
        #print(count)
        answer = min(answer, count)
    elif count > answer:
        return
    else:
        for i in range(len(l)-1):
            sum = l[i] + l[i+1]
            result = l[:i] + [int(x) for x in list(str(sum))] + l[i+2:]
            #print(result)
            dfs(count+1, result)

dfs(0, L)
print(answer)


### FIXED CODE ###

import sys
import numpy as np

stdin = sys.stdin
 
ni = lambda:int(ns())
na = lambda:list(map(int,stdin.readline().split()))
ns = lambda:stdin.readline().rstrip()  # ignore trailing spaces

M = ni()
D = [] ; C = []

for i in range(M):
    d, c = na()
    D.append(d)
    C.append(c)

D = np.array(D) ; C = np.array(C)
#桁数の9倍とそれぞれの数字の総和をx
x = C.sum() * 9 + (C * D).sum()
# 18以下で終了
answer = (x + 8) // 9 - 2
print(answer)
a = int(input())

b = list(map(int,input().split()))
d = max(b)
c = [0 for i in range(pow(10,5))]
cc = [0 for i in range(pow(10,5))]
for i in range(a):
    if i % 2 == 0:
        c[b[i]-1] += 1
    else:
        cc[b[i]-1] += 1

one = 0
onee = 0
two = 0
twoo = 0
p = 0
pp = 0
for i in range(d):
    if one < c[i]:
        onee = one
        one = c[i]
        p += 1
    if two < cc[i]:
        twoo = two
        two = cc[i]
        p += 1
    if p == 2
        pp = 1
    else:
        pp = 0
    p = 0

t = max(one+twoo,onee+two)

if pp == 0
    print(a-one-two)
else:
    print(a-t)


### FIXED CODE ###

from collections import Counter

a = int(input())

b = list(map(int,input().split()))
d = max(b)
c = [0 for i in range(pow(10,5)+1)]
cc = [0 for i in range(pow(10,5)+1)]
for i in range(len(b)):
    if i % 2 == 0:
        c[b[i]] += 1
    else:
        cc[b[i]] += 1
first = Counter(b[::2]).most_common(2) + [(0, 0)]
latter = Counter(b[1::2]).most_common(2) + [(0, 0)]
one = 0
onee = 0
two = 0
twoo = 0
k = 0
kk = 0
for i in range(d+1):
    if one <= c[i]:
        onee = one
        one = c[i]
        k = i
    elif onee <= c[i]:
        onee = c[i]
    if two <= cc[i]:
        twoo = two
        two = cc[i]
        kk = i
    elif twoo <= cc[i]:
        twoo = cc[i]
t = max(one+twoo,onee+two)

if k != kk:
    print(a-one-two)
else:
    print(a-t)
N, M = map(int,raw_input().split())
gra = [set() for n in range(N)]

start = set(range(N))
for m in range(M) :
  x, y = map(int,raw_input().split())
  gra[x-1].add(y-1)
  start.discard(y-1)

def dfs(cur, par=-1) : 
  
  d = [0]
  for nxt in gra[cur] :
    if nxt == par : continue
    d.append(dfs(nxt, cur))

  return max(d) + int(par!=-1)

res = []
while start :
  res.append(dfs(start.pop()))

print max(res)

### FIXED CODE ###

N, M = map(int,raw_input().split())
gra = [set() for n in range(N)]
ins = [0] * N

start = set(range(N))
for m in range(M) :
  x, y = map(int,raw_input().split())
  gra[x-1].add(y-1)
  ins[y-1] += 1
  start.discard(y-1)

mem = [None for n in range(N)]
q = list(start)
for i in q : mem[i] = 0

longest = 0
while q :
  cur = q.pop(0)
  for nxt in gra[cur] :
    ins[nxt] -= 1
    if ins[nxt] == 0 :
      mem[nxt] = mem[cur] + 1
      longest = max(longest, mem[nxt])
      q.append(nxt)

print longest
def solve(n,p):
    
    memo = {}
    items = [(0,p)]
    result = 0
    while items:
        step, p = items.pop(0)
        if check(n,p):
            result = step
            break
        else:
            for i in range(n-1):
                candidate = tuple( p[:i] +[ p[i+1] ,p[i]] + p[i+2:] )
                if not candidate in memo:
                    items.append([step +1 , list(candidate)])
                    memo[candidate] = step + 1
                
    return result

n = int(input())
p = map(int, input().split(" "))

print(solve(n, p))

### FIXED CODE ###

def solve(n, p):
    result = 0
    for i in range(n-1):
        if (i+1) == p[i]:
            p[i], p[i+1] = p[i+1],p[i]
            result += 1
    i = n - 1
    if (i+1) == p[i]:
        p[i-1], p[i] = p[i],p[i-1]
        result += 1
    return result

if __name__ == '__main__':
    n = int(input())
    p = list(map(int, input().split(" ")))
    print(solve(n, p))
A, op, B = map(int, input().split())

if op == "+":
    print(A + B)

if op == "-":
    print(A - B)


### FIXED CODE ###

A, op, B = map(str, input().split())

if op == "+":
    print(int(A) + int(B))

if op == "-":
    print(int(A) - int(B))
a = int(input())
b = int(input())

x = ( a * b )

if x % 2 == 0:
    print("Even")
else:
    print("odd")

### FIXED CODE ###

a, b = map(int, input().split())
answer = a * b
if answer % 2 == 0:
    print('Even')
else:
    print('Odd')
a,b=map(int,input().split())
ans=0:
for i in range(a+1):
  for j in range(a+1):
    for k in range(a+1):
      if i+j+k==b:
        ans++
print(ans)
        

### FIXED CODE ###

a,b=map(int,input().split())
ans=0
for i in range(a+1):
  for j in range(a+1):
      if 0<=b-i-j<=a:
        ans+=1
print(ans)
n=input()
d={}
for i in range(n):
  card=input()
  d[card]=True
  

for c in ["S","H","C","D"]:
  for i in brange(1,13):
    card=c+' '+str(n)
    if not key in d:
      print(key)


### FIXED CODE ###

n=int(input())
d={}
for i in range(n):
  card=input()
  d[card]=True
for c in ["S","H","C","D"]:
  for n in range(1,14):
    key=c+' '+str(n)
    if not key in d:
      print(key)
import math
a, b = map(int, input().split())
if abs(a - b) >= 2:
    print(0)
else:
    x = math.factorial(a)
    y = math.factorial(b)
    ans = x * y
    if a == b:
        print(ans * 2 % (10 ** 9 + 7))
    else:
        print(ans % (10 ** 9 + 7))

### FIXED CODE ###

x, a, b = map(int, input().split())
if b - a <= 0:
    print("delicious")
elif b - a <= x:
    print("safe")
else:
    print("dangerous")
a=input()
s="abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)-1)
  if s[i]==a:
	print(s[i+1])

### FIXED CODE ###

a=input()
s="abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)-1):
	if s[i]==a:
		print(s[i+1])
#!/usr/bin/env python3
import sys
import math

MOD = 1000000007  # type: int

def solve(X: int, Y: int):
    a = (2*Y - X)/3
    b = (2*X - Y)/3
    if ((2*Y - X)%3 != 0) and ((2*X - Y)%3 != 0):
        ans = 0
    else:
        if (a<0) or (b<0):
            ans = 0
        else:
            f_a = math.factorial(int(a))
            if a==b:
                ans = math.factorial(int(a+b)) / f_a / f_a
            else:
                ans = math.factorial(int(a+b)) / f_a / math.factorial(int(b))
    print(int(ans%MOD))

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import math

MOD = 10**9+7  # type: int

def combi_count(n, r):
    x = 1
    y = 1
    for i in range(1, r+1):
        x = x * (n-i) % MOD
        y = y * i % MOD

    # nCr = n!/((n-r)!*r!) = (n!/(n-r)!) / r! 
    #     :=                 (    x    ) / y

    # x / y            % MOD
    # x * y^(-1)       % MOD
    # x * y**(MOD - 2) % MOD (from フェルマー定理)

    return x * pow(y, MOD-2, MOD) % MOD

def solve(X: int, Y: int):
    a = int((2*Y - X)/3)
    b = int((2*X - Y)/3)
    if ( ((2*Y - X)%3 != 0) and ((2*X - Y)%3 != 0) )  or ((a<0) or (b<0)):
        ans = 0
    else:
        ans = combi_count(a+b+1, min(a, b))
    print(ans)

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    X, Y = map(int, input().split())
    solve(X, Y)

if __name__ == '__main__':
    main()
import  numpy as np
n,k,q = map(int,input().split())
a = []
while True:
  try:
    a.append(int(input()))
  except:
    break

score = np.ones(n)*k

for i in range(q):
  score -=1
  score[a[i]-1] += 1

for i in score:
  if i>=1:
    print("Yes")
  else:
    print("No")


### FIXED CODE ###

n,k,q = map(int,input().split())
a = []
while True:
  try:
    a.append(int(input()))
  except:
    break

score = [k-q]*n

for i in range(q):
  score[a[i]-1] +=1

for i in score:
  if i>=1:
    print("Yes")
  else:
    print("No")
import math
import copy
H,N=map(int,input().split())

#inf=float('inf')
dp=[0]+[1e8]*H

for i in range(N):
    A,B=map(int,input().split())
    if A>=H:
        ndp[-1]=min(B,dp[-1])
    else:
        for j in range(A,H+1):
            dp[j]=min(dp[j-A]+B,dp[j])

            if j > H-A:
                dp[-1]=min(dp[-1],dp[j]+B)


print(dp[-1])


### FIXED CODE ###

import math

def main():
    H,N=map(int,input().split())

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

    for i in range(N):
        A,B=map(int,input().split())
        if A>=H:
            #dp[-1]=min(B,dp[-1])
            if B < dp[-1]:
                dp[-1]=B
        else:
            for j in range(A,H+1):
                #dp[j]=min(dp[j-A]+B,dp[j])
                if dp[j-A]+B<dp[j]:
                    dp[j]=dp[j-A]+B

                if j > H-A:
                    #dp[-1]=min(dp[-1],dp[j]+B)
                    if dp[j]+B < dp[-1]:
                        dp[-1]=dp[j]+B

    print(dp[-1])

main()
S = inp
N = len(S)+1
a = [0] * N
for i in range(N-1):
	if S[i] == '<':
		a[i+1] = max(a[i+1], a[i]+1)
for i in range(N-2, -1, -1):
  if S[i] == '>':
    a[i] = max(a[i], a[i+1]+1)
      
print(sum(a))

### FIXED CODE ###

S = input()
N = len(S)+1
a = [0] * N
for i in range(N-1):
	if S[i] == '<':
		a[i+1] = max(a[i+1], a[i]+1)
for i in range(N-2, -1, -1):
  if S[i] == '>':
    a[i] = max(a[i], a[i+1]+1)
      
print(sum(a))
N, M = [int(x) for x in raw_input().split(' ')]
edges = []
for _ in range(M):
    edges.append([int(x) - 1 for x in raw_input().split(' ')])
res = [str(N * (N-1) / 2)]
init = N * (N-1) / 2
f = range(N)
cnt = [1] * N
def find(x):
    if x != f[x]:
        f[x] = find(f[x])
    return f[x]
for i in range(M-1, 0, -1):
    a, b = edges[i]
    fx, fy = find(a), find(b)
    if fx == fy:
        res.append(str(init))
    else:
        f[fy] = fx
        pre = cnt[fx] * (cnt[fx] - 1) / 2 + cnt[fy] * (cnt[fy] - 1) / 2
        cnt[fx] += cnt[fy]
        # print(a, b, f, cnt)
        init = init - cnt[fx] * (cnt[fx]-1) / 2 + pre
        res.append(str(init))
print('\n'.join(res[::-1]))


### FIXED CODE ###

N, M = [int(x) for x in input().split(' ')]
edges = []
for _ in range(M):
    edges.append([int(x)-1 for x in input().split(' ')])
res = [str(N * (N-1) // 2)]
init = N * (N-1) // 2
f = list(range(N))
cnt = [1] * N
def find(x):
    if x != f[x]:
        f[x] = find(f[x])
    return f[x]
for i in range(M-1, 0, -1):
    a, b = edges[i]
    fx, fy = find(a), find(b)
    if fx == fy:
        res.append(str(init))
    else:
        
        pre = cnt[fx] * (cnt[fx] - 1) // 2 + cnt[fy] * (cnt[fy] - 1) // 2
        if cnt[fx] < cnt[fy]:
            f[fx] = fy
            cnt[fy] += cnt[fx]
            init = init - cnt[fy] * (cnt[fy]-1) // 2 + pre
        else:
            f[fy] = fx
            cnt[fx] += cnt[fy]
            init = init - cnt[fx] * (cnt[fx] - 1) // 2 + pre
        res.append(str(init))
print('\n'.join(res[::-1]))
#
N = input()
#S = []
count = 0
flag = 0
for i in range(1,N+1):
    IN = input()
    #S.append(IN)
    if flag:
        if (flag == i - 1):
            if  IN > 0:
                IN -= 1
                count += 1
    flag = 0

    count += IN/2
    if IN%2 == 1:
        flag = i

print count


### FIXED CODE ###

IN = list(raw_input())
N = 0
S = 0
E = 0
W = 0

for i in range(len(IN)):
    if IN[i] == 'N':
        N += 1
    elif IN[i] == 'S':
        S += 1
    elif IN[i] == 'E':
        E += 1
    elif IN[i] == 'W':
        W += 1

if (N>0 and S>0):
    if (E==0 and W==0)or(E>0 and W>0):
        print 'Yes'
    else:
        print 'No'
elif N==0 and S ==0:
    if (E==0 and W==0)or(E>0 and W>0):
        print 'Yes'
    else:
        print 'No'
else:
    print 'No'
n = input()

s = 0
for i in range(len(n)):
    s+=n[i]
if int(n)%s:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = input()

s = 0
for i in range(len(n)):
    s+=int(n[i])
if int(n)%s==0:
    print("Yes")
else:
    print("No")
x,*y=map(int,open(0))
print(sum(y[1::2])-sum(y[0::2])+x)


### FIXED CODE ###

x,*y=map(int,open(0).read().split())
print(sum(y[1::2])-sum(y[0::2])+x)
n,a,b = map(int,input().split())

k = n//(a+b) + 1
L = ["b"]*a +["r"]*b
L = L*k
print(L[0:n].count("b"))


### FIXED CODE ###

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

print((n//(a+b))*a + min(n%(a+b), a))
(n,),*t=[map(int,t,split())for t in open(0)]
*e,=eval('[],'*-~n)
q=[(1,0)]
f=[-1]*n
for v,w,c in t=:e[v]+=(w,c),;e[w]+=(v,c),
for v,c in q:
 f[v-1]=c%2
 for w,d in e[v]:q+=[(w,c+d)]*(f[w-1]<0)
print(*f)

### FIXED CODE ###

from collections import*
n,*t=map(int,open(0).read().split())
e=[[]for _ in range(n)]
for v,w,c in zip(t[::3],t[1::3],t[2::3]):
  e[v-1].append((w-1,c))
  e[w-1].append((v-1,c))
q=deque([(0,0)])
f=[0]+[-1]*~-n
while q:
  v,c=q.pop()
  for w,d in e[v]:
    if-1<f[w]:continue
    d=(c+d)%2
    f[w]=d
    q.append((w,d))
print(*f)
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    h,w,k=map(int,input().split())
    S=[input() for _ in range(h)]
    final_ans=10**10
    for row_lis in range(1<<(h-1)):
        lst=[0]*h
        q,ans=0,0
        for r in range(h-1):
            if (row_lis>>r)&1==0:
                lst[r+1]=q
            else:
                q+=1
                lst[r+1]=q
                ans+=1
        data=[0]*h
        for j in range(w):
            for i in range(h):
                data[lst[i]]+=int(S[i][j])
                if data[lst[i]]>k:
                    ans+=1
                    break
            else:
                continue
            data=[0]*h
            for i in range(h):
                data[lst[i]]+=int(S[i][j])
                if data[lst[i]]>k:
                    break
            else:
                continue
            break
        else:
            final_ans=min(final_ans,ans)
    print(final_ans)


if __name__=='__main__':
    main()

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A,B=[0]*n,[0]*n
    for i in range(n):
        A[i],B[i]=map(int,input().split())
    A.sort()
    B.sort()
    if n%2==1:
        print(B[n//2]-A[n//2]+1)
    else:
        print(int(((B[n//2-1]+B[n//2])/2-(A[n//2-1]+A[n//2])/2)*2)+1)

if __name__=='__main__':
    main()
import sys
import numpy as numpy
input = sys.stdin.readline

N,M = map(int,input().split())
XY = [[] for i in range(N)]

path = [-1] * (N)

for i in range(M):
  x,y = map(int,input().split())
  XY[x - 1].append(y - 1)

  
def recur(n):
  if path[n] != -1:
    return path[n]
  
  elif XY[n] == []:
    path[n] = 0
    return path[n]
        
  else:
    ret = 0
    for chi in XY[n]:
      ret = max(ret,recur(chi) + 1)
    
    path[n] = ret
    return path[n]
    
for i in range(N):
  recur(i)

print(max(path))

### FIXED CODE ###

import sys
import numpy as numpy
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 5)

N,M = map(int,input().split())
XY = [[] for i in range(N + 1)]

path = [-1] * (N + 1)

for i in range(M):
  x,y = map(int,input().split())
  XY[x - 1].append(y - 1)

  
def recur(n):
  if path[n] != -1:
    return path[n]
  
  elif XY[n] == []:
    path[n] = 0
    return path[n]
        
  else:
    ret = 0
    for chi in XY[n]:
      ret = max(ret,recur(chi) + 1)
    
    path[n] = ret
    return path[n]
    
for i in range(N):
  recur(i)

print(max(path))
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res

def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

n = I()
a = LI()
for i in range(n):
    a[i] -= i+1
a.sort()
b = a[n>>1]
ans = 0
for i in a:
    ans += abs(i-b)
if n%2:
    b = a[(n>>1)+1]
    ans_ = 0
    for i in a:
        ans_ += abs(i-b)
    if ans > ans_:
        ans = ans_
    b = (a[(n>>1)+1]+a[n>>1])>>1
    ans_ = 0
    for i in a:
        ans_ += abs(i-b)
    if ans > ans_:
        ans = ans_
print(ans)


### FIXED CODE ###

#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
def A():
    return

#B
def B():
    return

#C
def C():
    n = I()
    a = LI()
    for i in range(n):
        a[i] -= i+1
    a.sort()
    b = sum(a)//n
    ans = 0
    for i in range(n):
        ans += abs(a[i]-b)
    ans2 = 0
    b += 1
    for i in range(n):
        ans2 += abs(a[i]-b)
    ans3 = 0
    b = a[n//2]
    for i in range(n):
        ans3 += abs(a[i]-b)
    print(min(ans,ans2,ans3))

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    C()
#金額
num   = int((int(input()) + 1 ) / 2)
retu    = input().split()
card = list( map((lambda x:int(x)),retu))
cardList = sorted(card, reverse=True)
Alice = 0
Bob = 0

for w in range(num):
    Alice = Alice + cardList[w*2]
    Bob = Bob + cardList[w*2+1]

print(Alice - Bob)


### FIXED CODE ###

#金額
moto = int(input())
num   = int((moto + 1 ) / 2)
retu    = input().split()
card = list( map((lambda x:int(x)),retu))
cardList = sorted(card, reverse=True)
Alice = 0
Bob = 0

for w in range(num):
    Alice = Alice + cardList[w*2]
    if moto > (w*2+1):
        Bob = Bob + cardList[w*2+1]

print(Alice - Bob)
inp=input().split(" ")
N=int(inp[0])
K=int(inp[1])
dislike=input().split(" ")
like=[]
for i in range(0,10):
    if str(i) not in dislike:
        like.append(str(i))
def search_min(n,like):
    n=str(n)
    if len(n)==1:
        for i in like:
            if i>=n:
                return i
    else:
        if n[0] in like:
            if n[1]<=like[-1]:
                return n[0]+search_min(n[1:],like)
            else:
                j=like.index(n[0])
                return like[j+1]+like[0]*(len(n)-1)
        else:
            for i in like:
                if i>n[0]:
                    return i+like[0]*(len(n)-1)
print(search_min(N,like))

### FIXED CODE ###

inp=input().split(" ")
N=int(inp[0])
K=int(inp[1])
dislike=input().split(" ")
like=[]
for i in range(0,10):
    if str(i) not in dislike:
        like.append(str(i))
def search_min(n,like):
    n=str(n)
    if len(n)==1:
        for i in like:
            if i>=n:
                return i
    else:
        if n[0] in like:
            if n[1]<=like[-1]:
                try:
                    return n[0]+search_min(n[1:],like)
                except TypeError:
                    return None
            else:
                j=like.index(n[0])
                if j+1<len(like):
                    return like[j+1]+like[0]*(len(n)-1)
        else:
            for i in like:
                if i>n[0]:
                    return i+like[0]*(len(n)-1)
if search_min(N,like)==None:
    n=len(str(N))
    k="1"+"0"*n
    print(search_min(k,like))
else:
    print(search_min(N,like))
for i in range(3000):
    x,y = (int,input().split)
    if x!=0 and y!=0:
        print(min([x,y]), max([x,y]))



### FIXED CODE ###

while True:
    x,y = map(int,input().split())
    if (x,y) == (0,0):
        break
    else:
        if x < y:
            print(x,y)
        else:
            print(y,x)
from collections import defaultdict
import sys
from fractions import Fraction

count = defaultdict(int)
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

ZERO = Fraction(0, 1)
pairs = {}
solos = []
for k1 in count:
    if k1 in pairs:
        continue
    if k1 == "I":
        if ZERO in count:
            pairs[ZERO] = k1
        continue

    for k2 in count:
        if k2 == ZERO:
            continue
        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=[]
for x in range(n):
      h.append(int(input))
      
count=flag=0 
for i in range(n): 
      if(h[i]>h[i+1]):
        flag+=1
      else :
        count=flag if(flag>count) else count
        flag=0
print(count)

### FIXED CODE ###

n = int(input())
x = input().split()
y = [0]
c = 0
for i in range(n-1):
  if int(x[i]) >= int(x[i+1]):
    c = c + 1
  else:
    y.append(c)
    c = 0
y.append(c)
print(max(y))