Harryxun/stf_run huggingface dataset:
A,B,C,D,E,F = map(int,input().split())

maxconc = 0
for i in range(31):
    for j in range(31):
        for k in range(31):
            for l in range(31):
                water = A*i + B*j
                sugar = C*k + D*l
                if 100*water + sugar > F or 100*water + sugar == 0:continue
                if sugar <= water * E:
                    conc = (sugar)/(sugar+100*water)
                    if conc > maxconc:
                        ans = [100*water+sugar,sugar]
                        maxconc = conc
                    
print(*ans)
                        
                        
                        
                    

### FIXED CODE ###

A,B,C,D,E,F = map(int,input().split())
ans = [0,0]
maxconc = -1
for i in range(31):
    for j in range(31):
        water = A*i + B*j
        if 100 * water > F:continue
        loopk = E*water // C + 1
        
        for k in range(loopk):
            loopl = (E*water-C*k)// D + 1
            for l in range(loopl):
                sugar = C*k + D*l
                if 100*water + sugar > F or 100*water + sugar == 0:continue
                if sugar <= water * E:
                    conc = (sugar)/(sugar+100*water)
                    if conc > maxconc:
                        ans = [100*water+sugar,sugar]
                        maxconc = conc
                    
print(*ans)
N = int(input())
A = list(map(int, input().split()))
B = []

for i in range(1,N+1):
    B[i] = 0
for j in A:
    B[j] += 1
for k in B.values():
    print(k)

### FIXED CODE ###

B = {}#辞書作成
N = int(input())
A = list(map(int, input().split()))


for i in range(N):
    B[i+1] = 0
#print(B)
for j in A:
    B[j] += 1
#print(B)
for k in B.values():
    print(k)
def main():
    n = int(input())
    ll = list()
    for i in range(n):
        tmp = list(map(str, input().split()))
        tmp[1] = int(tmp[1])
        tmp.append(i+1)
        ll.append(tmp)
    print(ll)
    
    ll_s = sorted(ll, key=lambda x:(x[0],-x[1]))
    print(ll_s)
    for i in ll_s:
        print(i[2][0])
        
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n = int(input())
    ll = list()
    for i in range(n):
        tmp = list(map(str, input().split()))
        tmp[1] = int(tmp[1])
        tmp.append(i+1)
        ll.append(tmp)
    ll_s = sorted(ll, key=lambda x:(x[0],-x[1]))
    for i in ll_s:
        print(i[2])

if __name__ == '__main__':
    main()
n, m, k = map(int, input().split())

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

time = 0
count = 0
i = 0
j = 0
for _ in range(n + m):
    if i > len(a) - 1:
        time += b[j]
        j += 1
    elif j > len(b) -1 :
        time += a[i]
        i += 1
    elif i > len(a)-1 and j > len(b)-1:
        break
    else:
        if a[i] < b[j]:
            time += a[i]
            i +=1
        elif a[i] > b[j]:
            time += b[j]
            j +=1
        else:
            time += a[i]
            if a[i + 1] < b[j+1]:
                i += 1
            else:
                j += 1
    if time > k:
        break
    else:
        count += 1
print(count)

### FIXED CODE ###

n, m, k = map(int, input().split())

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

a, b = [0], [0]
for  i in range(n):
    a.append(a[i]+A[i])
for i in range(m):
    b.append(b[i] + B[i])

ans, j = 0, m
for i in range(n+1):
    if a[i]>k:
        break
    while b[j] > k - a[i]:
        j -= 1
    ans = max(ans, i+j)
print(ans)
I = [int(input()) for i in range(6)]

I[0] = a
I[4] = e
I[5] = k

if e-a > k:
	print(':(')
else :
	print('Yay!')

### FIXED CODE ###

I =[int(input())for i in range(6)]

if I[4] - I[0] > I[5] :
	print(":(")
else :
	print("Yay!")
N = int(input())
a = list(range(1,N+1))
b = list(range(2,N+2))
b[N-1] = 1

sum = 0
for i in range(N):
	sum += a[i]%b[i]
print(sum)







### FIXED CODE ###

import numpy as np
N = int(input())
print((N*(N-1))//2)
from collections import Counter
n,k,q = map(int,input().split())
a = [int(input) for _ in range(n)]
a = Counter(a)
for i in range(1,n+1):
    if a[i] > q-k:
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

from collections import Counter
n,k,q = map(int,input().split())
a = [int(input()) for _ in range(q)]
a = Counter(a)
for i in range(1,n+1):
    if a[i] > q-k:
        print('Yes')
    else:
        print('No')
a,b=[int(x) for x in input().split()]
print('EOvdedn'.[(a*b)%2==1::2])

### FIXED CODE ###

a,b=[int(x) for x in input().split()]
print('EOvdedn'[(a*b)%2==1::2])
s = input()
t = input()
S,T = len(s),len(t)

ans = T

for i in range(S-T+1):
    tmp = [c1!=c2 for c1,c2 in zip(s[i:i+T],t)].count(True)
    ans = min(ans,tmp)

print(ans)


### FIXED CODE ###

D,T,S = map(int,input().split())
if D/T <= S:
    print("Yes")
else:
    print("No")
a,b=map(int,input(),sprit())
print(max(a+b,a-b,a*b))

### FIXED CODE ###

a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
N,C=map(int,input().split())
chan = ''
max1 = 0
for x in range(C):
  chan = chan + '0'
reserv = {}
for i in range(N):
  tmp = input().split()
  s,t,c=int(tmp[0]),int(tmp[1]),int(tmp[2])
  for j in range(s,t+1):
    if j in reserv:
      work = list(reserv[j])
      max1 = max(max1,1 + reserv[j].count('1'))
   	else:
      max1 = max(max1,1)
      work = list(chan)
    work[(c-1)] = '1'
    reserv[j] = "".join(work)
print(max1)

### FIXED CODE ###

N,C = map(int,input().split())
tvs = [list(map(int,input().split())) for _ in range(N)]
chans = [[] for _ in range(C+1)]
tvs.sort(key=lambda x:x[0])
targets = []
times = [0]*(pow(10,5)+2)

for tv in tvs:
  chans[tv[2]].append([tv[0],tv[1]])

for chan in chans:
  tmp = []
  if len(chan) == 1:
    targets.append(chan[0])
    continue
  for x in range(len(chan)):
    if len(tmp) == 0:
      tmp = chan[x]
      continue
    if chan[x][0] <= tmp[1] + 1:
      tmp[1] = chan[x][1]
      if x == len(chan)-1:
        targets.append(tmp)
    else:
      targets.append(tmp)
      tmp = chan[x]

for target in targets:
  times[target[0]] += 1
  times[target[1]+1] += -1

for j in range(1,pow(10,5)+2):
  times[j] += times[j-1]

print(max(times))
s=input()
print(s.cout('a'))

### FIXED CODE ###

s=input()
print(s.count('1'))
N, K = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]


def gcd(x, y):
    if x < y:
        return gcd(y, x)
    elif y == 0:
        return x
    else:
        return gcd(y, x % y)


g = A.pop()
for a in A:
    g = gcd(g, a)
if K <= max(A) and K % g == 0:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')


### FIXED CODE ###

N, K = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]


def gcd(x, y):
    if x < y:
        return gcd(y, x)
    elif y == 0:
        return x
    else:
        return gcd(y, x % y)


g = A[0]
for a in A:
    g = gcd(g, a)
if K <= max(A) and K % g == 0:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
import itertools

N, M, R = map(int, input().split())
r = map(int, input().split())
inf = float('inf')
d = [[inf for j in range(N)] for i in range(N)]

for i in range(N):
    d[i][i] = 0

for i in range(M):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    t = min(c, d[a][b])
    if d[a][b] > c:
        d[a][b], d[b][a] = t, t

for i in range(N):
    for j in range(N):
        for k in range(N):
            d[i][j] = min(d[i][j], d[i][k] + d[k][j])

ans = inf
for i in list(itertools.permutations(r)):
    temp = 0
    for j in range(len(i)):
        temp += d[i[j]-1][i[j+1]]
    ans = min(ans, temp)

print(ans)

### FIXED CODE ###

from itertools import permutations

def main():
    N, M, R = map(int, input().split())
    r = map(int, input().split())
    inf = float('inf')
    d = [[inf] * N for i in range(N)]

    for i in range(N):
        d[i][i] = 0

    for i in range(M):
        a, b, c = map(int, input().split())
        a -= 1
        b -= 1
        if d[a][b] > c:
            d[a][b], d[b][a] = c, c

    for k in range(N):
        for i in range(N):
            for j in range(N):
                temp = d[i][k] + d[k][j]
                if d[i][j] > temp:
                    d[i][j] = temp

    ans = inf
    for i in permutations(r):
        temp = 0
        for j in range(len(i)-1):
            temp += d[i[j] - 1][i[j + 1] - 1]
            if temp > ans:
                break
        if ans > temp:
            ans = temp

    print(ans)


main()
import sys
input = sys.stdin.buffer.readline

def main():
    n = int(input())
    lis = list(map(int,input().split()))
    ans = Counter(lis)
    for j in lis:
        su = 0
        for k, v in ans.items():
            if k == j:
                su += (v - 2) * (v - 1) // 2
            else:
                su += (v - 1) * v // 2
        print(su)

if __name__ == '__main__':
    main()

### FIXED CODE ###

from collections import Counter
import sys
input = sys.stdin.buffer.readline

def main():
    n = int(input())
    lis = list(map(int,input().split()))
    d = Counter(lis)
    su = 0
    for e in d:
        su += (d[e] - 1) * d[e] // 2

    for e in lis:
        if d[e] <= 1:
            print(su)
        else:
            k = d[e]
            res = su - k*(k-1)//2 + (k-1)*(k-2)//2
            print(res)

if __name__ == '__main__':
    main()
# coding: utf-8

N=input()
A=input()

print((N**2)-A)

### FIXED CODE ###

N=int(input())

print((N*N)-int(input()))
a, b, c = map(int(input().split()))
 
if a == b:
  print(a)
elif a==c:
  print(a)
elif b==c:
  print(c)
 

### FIXED CODE ###

a, b, c = map(int, input().split())
 
if a == b:
    print(c)
elif a==c:
    print(b)
elif b==c:
    print(a)
import numpy as np
a,b = map(int, input().split())
grid1 = np.full((50,100), '.')
grid2 = np.full((50,100), '#')
a = a-1
b = b-1
x = y = 1
for i in range(a):
    grid2[x, y] = '.'
    y += 2
    if y != y % 100:
        x += 2
    y = y % 100

### FIXED CODE ###

import numpy as np
a,b = map(int, input().split())
grid1 = [['.' for j in range(100)] for i in range(50)]
grid2 = [['#' for j in range(100)] for i in range(50)]
a -= 1
b -= 1
x = y = 1

for i in range(a):
    grid2[x][y] = '.'
    y += 2
    if y != y % 100:
        x += 2
    y = y % 100
    if x >= 50 or y >= 100:break

x = y = 1
for i in range(b):
    grid1[x][y] = '#'
    y += 2
    if y != y % 100:
        x += 2
    y = y % 100
    if x >= 50 or y >= 100:break

print(100, 100)
grid = np.concatenate((grid1, grid2), axis=0)
for row in grid:
    print(''.join(row))
a = int(raw_input())
# ??????
print a*a*a

### FIXED CODE ###

# -*- coding: utf-8 -*-
a = int(raw_input())
# ??????
print a*a*a
N=int(input())
count=1
size=1
p=list(map(int,input().split()))
q=[p[0]]
for i in range (1,N):
  if p[i]!=p[i-1]:
    q.append(p[i])
    size+=1
j=0
while True:
  if j>=size-2:
    break
  while (q[j]-q[j+1])*(q[j+1]-q[j+2])>=0:
    j+=1
  count+=1
  j+=2
print(count)

### FIXED CODE ###

N=int(input())
count=1
size=1
p=list(map(int,input().split()))
q=[p[0]]
for i in range (1,N):
  if p[i]!=p[i-1]:
    q.append(p[i])
    size+=1
j=0
while True:
  if j>=size-2:
    break
  while (q[j]-q[j+1])*(q[j+1]-q[j+2])>=0:
    if j>=size-3:
      count-=1
      break
    j+=1    
  count+=1
  j+=2
print(count)
unko

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations,product#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): #xは64bit整数
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f

def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    N = int(input())
    #N, K = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列


    if N>=30:
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()
S = input()
T = input()

moji = []

for i in range(len(S)):
    j = 0
    cnt = 0
    

    while j < len(T) and i+len(T)-1 < len(S):
        if S[i+j] == T[j] or S[i+j] == '?':
            cnt += 1

        else:
            break
        j += 1
    
    if cnt == len(T):
        moji0 = ''
        if i == 0: moji0 = T+S[i+len(T):len(S)]
        elif i+len(T) > len(S)-1: 
            moji0 = S[0:i]+T
        else:
            moji0 = S[0:i]+T+S[i+len(T):len(S)]

        
        moji1 = moji0.replace('?', 'a')
\
        moji.append(moji1)

    
print(min(moji) if moji != [] else "UNRESTORABLE")

### FIXED CODE ###

S = input()
T = input()

moji = []

for i in range(len(S)):
    j = 0
    cnt = 0
    
    while j < len(T) and i+len(T)-1 < len(S):
        if S[i+j] == T[j] or S[i+j] == '?':
            cnt += 1

        else:
            break
        j += 1
    
    if cnt == len(T):
        moji0 = ''
        if i == 0: moji0 = T+S[i+len(T):len(S)]
        elif i+len(T) > len(S)-1: 
            moji0 = S[0:i]+T
        else:
            moji0 = S[0:i]+T+S[i+len(T):len(S)]

        
        moji1 = moji0.replace('?', 'a')
        moji.append(moji1)

print(min(moji) if moji != [] else "UNRESTORABLE")
from collections import deque
import copy
class BIT:
    def __init__(self, node_size):
        self._node = node_size+1
        self.bit = [0]*self._node

    def add(self, index, add_val):
        while index < self._node:
            self.bit[index] += add_val
            index += index & -index

    def sum(self, index):
        res = 0
        while index > 0:
            res += self.bit[index]
            index -= index & -index
        return res

s = input()
n = len(s)
a = [ord(i) - ord("a") for i in s]
x = [0]*26
for i in a:
  x[i] += 1
flag = 1
ki = -1
for i in x:
  if i%2 == 1:
    if flag:
      flag = 0
    else:
      print(-1)
      exit()
c = []
x2 = [0]*26
for i in a:
  x2[i] += 1
  if x[i]//2 >= x2[i]:
    c.append(i)
for i in range(n):
  if x[i]%2 == 1:
    b = copy.deepcopy(c)
    c.append(i)
    b = b[::-1]
    c.extend(b)
    break
else:
  b = copy.deepcopy(c)
  b = b[::-1]
  c.extend(b) 
d = {}
for i in range(26):
  d[i] = deque([])
for i in range(n):
  d[c[i]].append(i+1)
for i in range(n):
  x = d[a[i]].popleft()
  a[i] = x
b = []
for i in range(n):
  b.append([a[i],i+1])
b.sort()
b = b[::-1]
bit = BIT(n)
ans = 0
for i,j in b:
  bit.add(j,1)
  ans += bit.sum(j-1)
print(ans)

### FIXED CODE ###

from collections import deque
import copy
class BIT:
    def __init__(self, node_size):
        self._node = node_size+1
        self.bit = [0]*self._node
 
    def add(self, index, add_val):
        while index < self._node:
            self.bit[index] += add_val
            index += index & -index
 
    def sum(self, index):
        res = 0
        while index > 0:
            res += self.bit[index]
            index -= index & -index
        return res
 
s = input()
n = len(s)
a = [ord(i) - ord("a") for i in s]
x = [0]*26
for i in a:
  x[i] += 1
flag = 1
ki = -1
for i in x:
  if i%2 == 1:
    if flag:
      flag = 0
    else:
      print(-1)
      exit()
c = []
x2 = [0]*26
for i in a:
  x2[i] += 1
  if x[i]//2 >= x2[i]:
    c.append(i)
for i in range(26):
  if x[i]%2 == 1:
    b = copy.deepcopy(c)
    c.append(i)
    b = b[::-1]
    c.extend(b)
    break
else:
  b = copy.deepcopy(c)
  b = b[::-1]
  c.extend(b) 
d = {}
for i in range(26):
  d[i] = deque([])
for i in range(n):
  d[c[i]].append(i+1)
for i in range(n):
  x = d[a[i]].popleft()
  a[i] = x
b = []
for i in range(n):
  b.append([a[i],i+1])
b.sort()
b = b[::-1]
bit = BIT(n)
ans = 0
for i,j in b:
  bit.add(j,1)
  ans += bit.sum(j-1)
print(ans)
import math

r = int(input())
S = r * r * math.pi
L = 2 * r * math.pi

print('{0:.5f}'.format(S),'{0:.5f}'.format(L))

### FIXED CODE ###

import math

r = float(input())
S = r * r * math.pi
L = 2 * r * math.pi

print('{0:.6f}'.format(S),'{0:.6f}'.format(L))
import sys

for line in sys.stdin:
    A,B=int(line[0]),int(line[3])
    print A+B

### FIXED CODE ###

import sys

for line in sys.stdin:
    L=map(int,line.split())
    A,B=L[0],L[1]
    print A+B
D = input()
date_dict = {"25": "Christmas", 
"24": "Christmas Eve",
"23": "Christmas Eve Eve", 
"22": "Christmas Eve Eve Eve"}

print(date_dict(D))


### FIXED CODE ###

D = int(input())
if D == 25:
    print("Christmas")
elif D == 24:
    print("Christmas Eve")
elif D == 23:
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")
a,b = input().split()

if b % a == 0:
	print(a+b)
else:
	print(b-a)


### FIXED CODE ###

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

if b % a == 0:
	print(a+b)
else:
	print(b-a)
def main():
    s = list(input())
    k = int(input())
    lst = []
    cnt = 1
    flg = 0
    ans = 0
    prev = s[0]
    for i in range(1, len(s)):
        if prev == s[i]:
            cnt += 1
        else:
            lst.append(cnt)
            cnt = 1
            prev = s[i]
            flg = 1
    lst.append(cnt)
    if len(lst) == 1:
        ans = s * k // 2
    else:
        # ans += sum(list(map(lambda x: x // 2, lst[1:len(lst)-1]))) * k
        for l in lst[1: len(lst) - 1]:
            ans += l // 2 * k
        if s[-1] == s[0]:
            ans += (lst[0] + lst[-1]) // 2 * (k - 1)
            ans += lst[0] // 2 + lst[-1] // 2
        else:
            ans += (lst[0] // 2 + lst[-1] // 2) * k
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###



def main():
    s = list(input())
    k = int(input())
    lst = []
    cnt = 1
    flg = 0
    ans = 0
    prev = s[0]
    for i in range(1, len(s)):
        if prev == s[i]:
            cnt += 1
        else:
            lst.append(cnt)
            cnt = 1
            prev = s[i]
            flg = 1
    lst.append(cnt)
    if len(lst) == 1:
        ans = len(s) * k // 2
    else:
        ans += sum(list(map(lambda x: x // 2, lst[1:len(lst)-1]))) * k
        # for l in lst[1: len(lst) - 1]:
        #     ans += l // 2 * k
        if s[-1] == s[0]:
            ans += (lst[0] + lst[-1]) // 2 * (k - 1)
            ans += lst[0] // 2 + lst[-1] // 2
        else:
            ans += (lst[0] // 2 + lst[-1] // 2) * k
    print(ans)


if __name__ == "__main__":
    main()
N=int(input())
S=list(input())


while N!=1:
    for i in range(N-1):
        if S[i]==S[i+1]:
            S[i]='K'
            c=1
    if c==0:
        break
    while 'K' in S:
        S.remove('K')
        N-=1
        c=0
print(len(S))


### FIXED CODE ###

N=int(input())
S=list(input())
L=[]
if N!=1:
    for i in range(N-1):
        if S[i]!=S[i+1]:
            L.append(S[i+1])

print(len(L)+1)
n,k,s = map(int,input().split())
if k == 0:
	if s != 10**9:
		print(" ".join([s+1 for _ in range(n)]))
	else:
		print(" ".join([1] for _ in range(n)))
elif s != 10**9:
	ans = [10**9 for _ in range(n)]
	for i in range(k):
		ans[i] = s
	print(" ".join([str(ans[i]) for i in range(n)]))
else:
	ans = [1 for _ in range(n)]
	for i in range(k):
		ans[i] = s
	print(" ".join([str(ans[i]) for i in range(n)]))

### FIXED CODE ###

n,k,s = map(int,input().split())
if k == 0:
	if s != 10**9:
		print(" ".join([str(10**9) for _ in range(n)]))
	else:
		print(" ".join([str(1) for _ in range(n)]))
elif s != 10**9:
	ans = [10**9 for _ in range(n)]
	for i in range(k):
		ans[i] = s
	print(" ".join([str(ans[i]) for i in range(n)]))
else:
	ans = [1 for _ in range(n)]
	for i in range(k):
		ans[i] = s
	print(" ".join([str(ans[i]) for i in range(n)]))
N = int(input())
P = list(map(int, input().split()))

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

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
if M<N:
  print("No")
else:
  print("Yes")
n,m = map(int,input().split())
res={i for i in range(1,n+1)}
for i in range(m):
	l,r = map(int,input().split())
	g = { i for i in range(min(res) if l < min(res) else l,r+1)}
	res = res&g
	if res == {} :
		print(0)
		break
print(len(res))

### FIXED CODE ###


n,m = map(int,input().split())
L = []
R = []
for i in range(m):
	l,r = map(int,input().split())
	L.append(l)
	R.append(r)

l = L[0]
r = R[0]
cnt = 0
for i in range(max(L),min(R)+1) :
	if 0<=i<=r :
		cnt += 1
print(cnt)
import sys
sys.setrecursionlimit(10**6)
while 1:
    n = input()
    if n == 0:
        break
    G = [[] for i in xrange(n)]
    for i in xrange(n-1):
        s, t, w = map(int, raw_input().split())
        G[s].append((t, w))
        G[t].append((s, w))

    def dfs(s, prev):
        if prev != -1 and len(G[s]) == 1:
            return (0, s)
        res = (0, -1)
        for t, w in G[s]:
            if t == prev:
                continue
            cost, v = dfs(t, s)
            res = max(res, (cost + w, v))
        return res
    co, t = dfs(0, -1)
    if t != -1:
        print dfs(t, -1)[0]
    else:
        print 0

### FIXED CODE ###

N = int(input())
G = [[] for i in range(N)]
for i in range(N-1):
    s, t, w = map(int, input().split())
    G[s].append((t, w))
    G[t].append((s, w))

from collections import deque
def bfs(s):
    dist = [None]*N
    que = deque([s])
    dist[s] = 0
    while que:
        v = que.popleft()
        d = dist[v]
        for w, c in G[v]:
            if dist[w] is not None:
                continue
            dist[w] = d + c
            que.append(w)
    d = max(dist)
    return dist.index(d), d
u, _ = bfs(0)
v, d = bfs(u)

print(d)
n=int(input())
P=list(map(int,input().split()))
t=len(P)
m=0
for i in range(t):
  if P[i]!=P.index(i+1)+1:
    m+=1
if m=2:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n=int(input())
P=list(map(int,input().split()))
t=len(P)
m=0
for i in range(t):
  if P[i]!=i+1:
    m+=1
if m<=2:
  print("YES")
else:
  print("NO")
import math

n=input()
n=int(n)
a=input()
a=int(a)
b=input()
b=int(b)
list = []
for i in range(n+1):
    x=math.floor(i/1000) +math.floor(i/100)+math.floor(i/10)+i%10
    #print(x)
    if(x>=a and x<=b):
        list.append(i)

print(sum(list))
#print(list)

### FIXED CODE ###

import math

b = [int(e) for e in input().split()]
"""
n=input()
n=int(n)
a=input()
a=int(a)
b=input()
b=int(b)
"""
list = []
for i in range(b[0]+1):
    x=i
    check = 0
    #print(x)
    while(True):
        check=check+x%10
        x=math.floor(x/10)
        #print(x)
        if(x==0):
            break
    if(check>=b[1] and check<=b[2]):
        list.append(i)

print(sum(list))
#print(list)