Harryxun/stf_run huggingface dataset:
N = int(input()) #マスの数
Hlist = list(map(int, input().split())) #マスの高さのリスト
n = 0
nlist = []

for i in range(N-1):
    if Hlist[i] >= Hlist[i+1]:
        n += 1
        if i == N-2:
            nlist.append(n)
    else:
        nlist.append(n)
        n = 0

print(max(nlist))

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
 
t = 0
result =0
 
for i in range(n-1):
  if h[i] >= h[i+1]:
    t += 1
  else:
    result = max(t,result)
    t = 0
 
result = max(t, result)
 
print(result)
n, q = list(map(int, input().split()))
s = input()
for i in range(q):
    l, r = list(map(int, input().split()))
    print(len(s[l - 1:r].split("AC")) - 1)


### FIXED CODE ###

b=input()

if b=="A":
    print("T")
elif b=="T":
    print("A")
elif b=="C":
    print("G")
else:
    print("C")
import math

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

a = x+y
b = abs(x-y)
c = (x+y)/3
e=1

if a%3 != 0:
    ans = 0
elif b==c:
    ans = 1
else:
    d=c / 2 + b / 2
    n=int(c-(c/2+b/2))

    for i in range(n):
        e*=d-i

    ans = int(e/math.factorial(n))%(10**9+7)

print(ans)

### FIXED CODE ###

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

if (x+y)%3 != 0:
    print(0)
    exit(0)

n = (2*y-x)//3
m = (2*x-y)//3

if n<0 or m<0:
    print(0)
    exit(0)

mi = min(n,m)
num = n+m
mod = 10**9+7
a = 1
b = 1

for i in range(mi):
    a = a*(num-i)%mod
    b = b*(mi-i)%mod

print((a*pow(b,mod-2,mod))%mod)
from collections import Counter
N = int(input())
A = Counter(list(map(int,input().split(' '))))
ans = 0
L = [1]*(10**6+1)
for i in sorted(A.keys()):
    if A[i] > 1:
        continue
    ans += L[i]
    for j in (i,10**6+1,i):
        L[j] = 0
print(ans)

### FIXED CODE ###

from collections import Counter
N = int(input())
A = Counter(list(map(int,input().split(' '))))
ans = 0
m = max(A.keys())
L = [1]*(10**6+1)
for i in sorted(A.keys()):
    if not L[i]:
        continue
    if A[i] == 1:
        ans += 1
    for j in range(i,m+1,i):
        L[j] = 0
print(ans)
N, K = map(int, input().split())
A = list(map(int, input().split()))
    
n = 1
order = [n]
order_set = set([n])

for i in range(1, K + 1):
    n = A[n - 1]
    if n in order_set:
        Li = order.index(n)
        Ri = len(order)
        idx = Li + (K - Li) % (Ri - Li)
        print(order[idx])
        break
    else:
        order.append(n)
        order_set.add(n)
        continue
else:
    print(s)


### FIXED CODE ###

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

n = 1
order = [n]
order_set = set([n])

for i in range(1, K + 1):
    n = A[n - 1]
    if n in order_set:
        Li = order.index(n)
        Ri = len(order)
        idx = Li + (K - Li) % (Ri - Li)
        print(order[idx])
        exit()
    else:
        order.append(n)
        order_set.add(n)
        continue
print(n)
from bitarray import bitarray
n,T=[int(i) for i in input().split()]
t=[int(i) for i in input().split()]

ans=0
a = bitarray(100000)
a.setall(0)
for i in range(n):
    start=t[i]
    end=start+T
    a[start:end]=1
print(a.count())

### FIXED CODE ###

n, T = map(int, input().split())
t = list(map(int, input().split()))
 
ans = 0
for i in range(1, n):
    ans += min(t[i] - t[i-1], T)
print(ans + T)
a,b = map(int, input().split())
c = a * b
if c % 2 == 0:
  print(Even)
else:
  print(Odd)

### FIXED CODE ###

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

if a*b%2 == 0:
  print('Even')
else:
  print('Odd')
n, k = map(int, input().split())
l = []
for i in range(n):
    l.append(int(input()))

root = [1]*n

for i in range(n)[-2::-1]:
    num = 0
    for j in l[i + 1:]:
        if abs(i - j) <= k:
            num = max(num, root[j])
    root[i] += num
    if i < n - 1000:
        del l[-1]

print(max(root))

### FIXED CODE ###

n, k = map(int, input().split())
l = []
for i in range(n):
    l.append(int(input()))

root = [1]*n

for i in range(n)[-2::-1]:
    num = 0
    for j in range(i + 1, i + 200):
        if j >= n:
            break
        if abs(l[i] - l[j]) <= k:
            num = max(num, root[j])
    root[i] += num

print(max(root))
from subprocess import*
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
# import numpy as np
starttime = time.time()
# import numpy as np
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

try:
    # sys.setrecursionlimit(int(pow(10,6)))
    # sys.stdin = open("input.txt", "r")
    # sys.stdout = open("../output.txt", "w")
except:
    pass
call(('pypy3','-c',"""
s=input()
t=input()
a=len(s)
b=len(t)
dp=[[0]*(b+1) for i in range(a+1)]
for i in range(a):
  for j in range(b):
    if s[i]==t[j]:
      dp[i+1][j+1]=dp[i][j]+1
    else:
      dp[i+1][j+1]=max(dp[i][j+1],dp[i+1][j])
res=''
while a!=0 and b!=0:
  if dp[a][b]==dp[a-1][b]:
    a-=1
  elif dp[a][b]==dp[a][b-1]:
    b-=1
  else:
    a-=1
    b-=1
    res=s[a]+res
print(res)
"""))

### FIXED CODE ###

from subprocess import*
call(('pypy3','-c',"""
s=input()
t=input()
a=len(s)
b=len(t)
dp=[[0]*(b+1) for i in range(a+1)]
for i in range(a):
  for j in range(b):
    if s[i]==t[j]:
      dp[i+1][j+1]=dp[i][j]+1
    else:
      dp[i+1][j+1]=max(dp[i][j+1],dp[i+1][j])
res=''
while a!=0 and b!=0:
  if dp[a][b]==dp[a-1][b]:
    a-=1
  elif dp[a][b]==dp[a][b-1]:
    b-=1
  else:
    a-=1
    b-=1
    res=s[a]+res
print(res)
"""))
"""
from subprocess import*
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
# import numpy as np
starttime = time.time()
# import numpy as np
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

try:
    # sys.setrecursionlimit(int(pow(10,6)))
    # sys.stdin = open("input.txt", "r")
    # sys.stdout = open("../output.txt", "w")
except:
    pass

"""
H,W = map(int,input().split())
A = []

for i in range(H):
    t = list(input())
    A.append(t)

print(A)

move = [[-1,0],[1,0],[0,-1],[0,1]]
for i in range(H):
    for j in range(W):
        dp = [[float('inf') for i in range(W)] for j in range(H)]
        if A[i][j] == '.':
            for p,q in zip(move):
                if

### FIXED CODE ###

H,W = map(int,input().split())
A = []

for i in range(H):
    t = list(input())
    A.append(t)

tate = (-1,1,0,0)
yoko = (0,0,-1,1)
answer = 0

for i in range(H):
    for j in range(W):
        dp = [[10**4 for i in range(W)] for j in range(H)]
        if A[i][j] == '.':
            dp[i][j] = 0
            Q = list()
            Q.append([i,j])
            while(len(Q) > 0 ):
                s = Q[0][0]
                t = Q[0][1]
                for p, q in zip(tate, yoko):
                    m = s + p
                    n = t + q
                    if m >= 0 and m < H:
                        if n >= 0 and n < W:
                            if A[m][n] == '.':
                                if dp[m][n] == 10**4 :
                                    dp[m][n] = dp[s][t] + 1
                                    Q.append([m,n])
                Q.remove(Q[0])

            for k in range(H):
                for l in range(W):
                    if dp[k][l] < 10**4:
                        answer = max(answer,dp[k][l])

print(answer)
N,M = map(int,input().split(" "))
if N<10:
  print(a+(100*(10-N)))
else:
  print(M)

### FIXED CODE ###

N,M = map(int,input().split(" "))
if N<10:
  print(M+(100*(10-N)))
else:
  print(M)
import math
pi = math.pi

r = int(input())
area = pi*pi*r
length = pi*r*2

print('{:.5f}'.format(area),'{:5f}'.format(length))


### FIXED CODE ###

pi = 3.14159265359 
r = float(input()) 
area = r*r*pi 
length = 2*r*pi 

print('{:.6f}'.format(area),'{:.6f}'.format(length))
n = int(input())
a = list(map(int, input().split(' ')))
result = 0
h = 0
if a[0] == 0:
    counter += 1
    result += 1
else:
    counter += a[0]

for i in range(1, n):
    if counter < 0:
        counter += a[i]
        if counter == 0:
            counter += 1
            result +=1
        elif counter > 0:
            continue
        else:
            result += 1-counter
            counter = 1
    else:
        counter += a[i]
        if counter == 0:
            counter -= 1
            result += 1
        elif counter < 0:
            continue
        else:
            result += counter+1
            counter = -1
out = []
out.append(result)
result = 0
counter = 0
if a[0] == 0:
    counter -= 1
    result +=1
elif a[0]< 0:
    counter += 1
    result += 1-a[0]
else:
    counter -= 1
    result += 1+a[0]

for i in range(1, n):
    if counter < 0:
        counter += a[i]
        if counter == 0:
            counter += 1
            result += 1
        elif counter > 0:
            continue
        else:
            result += 1-counter
            counter = 1
    else:
        counter += a[i]
        if counter == 0:
            counter -= 1
            result +=1
        elif counter < 0:
            continue
        else:
            result += counter+1
            counter = -1
out.append(result)
print(min(out))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split(' ')))
result = 0
counter = 0
if a[0] == 0:
    counter += 1
    result += 1
else:
    counter += a[0]

for i in range(1, n):
    if counter < 0:
        counter += a[i]
        if counter == 0:
            counter += 1
            result +=1
        elif counter > 0:
            continue
        else:
            result += 1-counter
            counter = 1
    else:
        counter += a[i]
        if counter == 0:
            counter -= 1
            result += 1
        elif counter < 0:
            continue
        else:
            result += counter+1
            counter = -1
out = []
out.append(result)
result = 0
counter = 0
if a[0] == 0:
    counter -= 1
    result +=1
elif a[0]< 0:
    counter += 1
    result += 1-a[0]
else:
    counter -= 1
    result += 1+a[0]

for i in range(1, n):
    if counter < 0:
        counter += a[i]
        if counter == 0:
            counter += 1
            result += 1
        elif counter > 0:
            continue
        else:
            result += 1-counter
            counter = 1
    else:
        counter += a[i]
        if counter == 0:
            counter -= 1
            result +=1
        elif counter < 0:
            continue
        else:
            result += counter+1
            counter = -1
out.append(result)
print(min(out))
N, K = map(int, input().split())
md = []
while N != 0:
  md.append(N%K)
  N /= K
print(len(md)+1)

### FIXED CODE ###

N, R = map(int, input().split())
if N < 10:
  print(R+100*(10-N))
else:
  print(R)
W,H,N=map(int,input().split())
List = []
for i in range (N):
  List.append(list(map(int, input().split())))
WRange = [0,W]
HRange = [0,H]
for i in range(N):
  if List[i][2] == 1:
    WRange[0] = List[i][0]
  elif List[i][2] == 2:
    WRange[1] = List[i][0]
  elif List[i][2] == 3:
    HRange[0] = List[i][1]
  else List[i][2] == 4:
    HRange[1] = List[i][1]
if WRange[1]-WRange[0] >0:
  W = WRange[1]-WRange[0]
else:
  W = 0
if HRange[1]-HRange[0] >0:
  H = HRange[1]-HRange[0]
else:
  H = 0
res = H * W
print(res)

### FIXED CODE ###

W,H,N=map(int,input().split())
List = []
for i in range (N):
  List.append(list(map(int, input().split())))
WRange = [0,W]
HRange = [0,H]
for i in range(N):
  if List[i][2] == 1:
    WRange[0] = max(WRange[0],List[i][0])
  elif List[i][2] == 2:
    WRange[1] = min(WRange[1],List[i][0])
  elif List[i][2] == 3:
    HRange[0] = max(HRange[0],List[i][1])
  else:
    HRange[1] = min(HRange[1],List[i][1])
if WRange[1]-WRange[0] >0:
  W = WRange[1]-WRange[0]
else:
  W = 0
if HRange[1]-HRange[0] >0:
  H = HRange[1]-HRange[0]
else:
  H = 0
res = H * W
print(res)
x=int(input())

b=0
while(True):
    bi=b**5
    ai=x+bi
    aj=int(ai**(1/5))
#    print(ai,aj,bi,b)
    if((aj**5)==ai):
        print(aj,b)
        break
    b*=-1

    bi=b**5
    ai=x+bi
    aj=int(ai**(1/5))
#    print(ai,aj,bi,b)
    if((aj**5)==ai):
        print(aj,b)
        break
    b*=-1

    b+=1


### FIXED CODE ###

x=int(input())

b=0
while(True):
    bi=b**5
    ai=x+bi
#    print(ai,bi,(ai**(1/5))%1.0)
    #X-B^5 は整数を５乗した数か判定
    if(int((ai**(1/5))%1.0) == 0):

        aj=int((ai**(1/5))//1)
#        print(ai,aj,bi,b)
        if((aj**5)==ai):
            print(aj,b)
            break
    b*=-1

    bi=b**5
    ai=x+bi

    if(ai>=0 and int((ai**(1/5))%1.0) == 0):
        aj=int((ai**(1/5))//1)
#        print(ai,aj,bi,b)
        if((aj**5)==ai):
            print(aj,b)
            break
    b*=-1

    b+=1
atcoder

### FIXED CODE ###

s = [i for num,i in enumerate(input()) if num%2==0]
print("".join(s))
N, K = map(int, input().split())
num = list(map(int, input().split()))
 
# 各サイコロの期待値を出す
expect = []
for i in range(N):
  expect.append((1 + num[i]) / 2)
 
# 累積和を作る
cs = [0]
for i in range(N):
    cs.append(cs[i]+expect[i])

max = 0
for i in range(K, N+1): # 配列0番目に初期値0が増えてるので1足す
  if max < cs[i] - cs[i-K]:
    max = cs[i] - cs[i - K]
print(max)

### FIXED CODE ###

s,t = map(str,input().split())
a,b = map(int,input().split())
u=str(input())

if s == u:
    a=a-1
else:
    b=b-1

print(a,b)
s=input()
for i in reversed(range(0,len(s)-1,2)):
  if s[:len(s)//2]==s[len(s)//2:]:
    print(len(s))
    break
  else:
    s=[:len(s)-2]

### FIXED CODE ###

s=input()
ans=0
for i in range(1,len(s)//2):
  if s[0:i]==s[i:2*i]:
    ans=i
print(ans*2)
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18&lt;A:
    print(-1)
    exit()
print(A)

### FIXED CODE ###

N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)
n = input()
for i in range(n)
  Xs = raw_input()
  Ys = raw_input()
  count = 0
  a = 0

  for j in range(len(Ys) + 1):
    dp[0][j + 1] = Ys[j] 
  for i in range(len(Xs) + 1):
    dp[i + 1][0] = Xs[i]

  for j in range(1, len(Ys) + 1):
    for i in range(a + 1, len(Xs) + 1):
      if dp[i][0] == dp[0][j]:
         count = count + 1
         a = i 
         break
   
  print count

### FIXED CODE ###

def solve_lcs():
    x = raw_input()
    y = raw_input()
 
    a = len(x)
    b = len(y)
    c1 = [0 for i in range(b+1)]
    for i in range(a):
        e1 = x[i]
        c2 = c1+[]
        for j in range(b):
            if e1 == y[j]:
                c1[j+1] = c2[j] + 1
            elif c1[j+1] < c1[j]:
                c1[j+1] = c1[j]
    return c1[-1]
 
n = input()
for i2 in range(n):
    print solve_lcs()
n, a, b = map(int, input().split())

print(na if na< b else: b)

### FIXED CODE ###

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

if n*a < b:
  print(n*a)
else:
  print(b)
N,K=map(int,input().split())
A=list(map(int,input().split()))
B=1
for i in range(K,N):
  for j in range(K):
    B=B*A[0+i-K+j]
  if B*A[i]/A[i-K]>B:
    print ('Yes')
  else:
    print ('No')

### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
for i in range(K,N):
  if A[i]/A[i-K]>1:
    print ('Yes')
  else:
    print ('No')
N = int(input())
flag=False
max_i = N//4+1
for i in range(max_i):
  if((N-4*i)%7==0):
  	flag=True
  	break
print('Yes' if flag else 'No')



### FIXED CODE ###

N,K=map(int,input().split())
print(0 if (N%K==0) else 1)
n = int(input())
s = input()
dp = [[0] * 7 for i in range(4000)]

for i in range(n):
    if s[i] == 'R':
        dp[i + 1][0] = dp[i][0] + 1
        dp[i + 1][1] = dp[i][1]
        dp[i + 1][2] = dp[i][2]
        dp[i + 1][3] = dp[i][1] + dp[i][3]
        dp[i + 1][4] = dp[i][4]
        dp[i + 1][5] = dp[i][2] + dp[i][5]
        dp[i + 1][6] = dp[i][6] + dp[i][4]
    elif s[i] == 'G':
        dp[i + 1][0] = dp[i][0]
        dp[i + 1][1] = dp[i][1] + 1
        dp[i + 1][2] = dp[i][2]
        dp[i + 1][3] = dp[i][0] + dp[i][3]
        dp[i + 1][4] = dp[i][2] + dp[i][4]
        dp[i + 1][5] = dp[i][5]
        dp[i + 1][6] = dp[i][6] + dp[i][5]
    else:
        dp[i + 1][0] = dp[i][0]
        dp[i + 1][1] = dp[i][1]
        dp[i + 1][2] = dp[i][2] + 1
        dp[i + 1][3] = dp[i][3]
        dp[i + 1][4] = dp[i][1] + dp[i][4]
        dp[i + 1][5] = dp[i][0] + dp[i][5]
        dp[i + 1][6] = dp[i][6] + dp[i][3]
    for j in range(1, i // 2 + 1):
        if s[i] != s[i - j] and s[i] != s[i - j * 2] and s[i - j] != s[i - 2 * j]:
            dp[i + 1][6] -= 1
print(dp[n][6])

### FIXED CODE ###

n = int(input())
s = input()
dp = [[0] * 7 for i in range(4001)]

for i in range(n):
    if s[i] == 'R':
        dp[i + 1][0] = dp[i][0] + 1
        dp[i + 1][1] = dp[i][1]
        dp[i + 1][2] = dp[i][2]
        dp[i + 1][3] = dp[i][1] + dp[i][3]
        dp[i + 1][4] = dp[i][4]
        dp[i + 1][5] = dp[i][2] + dp[i][5]
        dp[i + 1][6] = dp[i][6] + dp[i][4]
    elif s[i] == 'G':
        dp[i + 1][0] = dp[i][0]
        dp[i + 1][1] = dp[i][1] + 1
        dp[i + 1][2] = dp[i][2]
        dp[i + 1][3] = dp[i][0] + dp[i][3]
        dp[i + 1][4] = dp[i][2] + dp[i][4]
        dp[i + 1][5] = dp[i][5]
        dp[i + 1][6] = dp[i][6] + dp[i][5]
    else:
        dp[i + 1][0] = dp[i][0]
        dp[i + 1][1] = dp[i][1]
        dp[i + 1][2] = dp[i][2] + 1
        dp[i + 1][3] = dp[i][3]
        dp[i + 1][4] = dp[i][1] + dp[i][4]
        dp[i + 1][5] = dp[i][0] + dp[i][5]
        dp[i + 1][6] = dp[i][6] + dp[i][3]
    for j in range(1, i // 2 + 1):
        if s[i] != s[i - j] and s[i] != s[i - j * 2] and s[i - j] != s[i - 2 * j]:
            dp[i + 1][6] -= 1
print(dp[n][6])
# -*- coding: utf-8 -*-
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
  T = pop(S[A])
  if T.isdigit() is True:
    print("Yes")
  else:
    print("No")
else:
  print("No")

### FIXED CODE ###

A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
    S = S[:A]+S[A+1:A+B+1]
    if S.isdigit() is True:
        print("Yes")
    else:
        print("No")
else:
    print("No")
import numpy as np
import itertools
 
H, W, K = list(map(int, input().split())) 
c = [input().split() for l in range(H)]
b=[]
d=[]
for m in range(len(c)):
  for item in c[m]:
    item_mod = item.replace("."  , "0")
    item_mod = item_mod.replace("#" , "1")
    b.append(item_mod)
  d.append(b)
  b=[]

C_arr = np.array(d , dtype = "int")
C_arr = C_arr.reshape((H,W))
 
In = np.array(list(itertools.product([0,1] , repeat=H)))
Out = np.array(list(itertools.product([0,1] , repeat=W)))
 
ans = 0
for i in range(2**H):
  for j in range(2**W):
    In_matrix = np.diag(In[i])
    Out_matrix = np.diag(Out[j])
 
    In_C = np.dot(In_matrix , C_arr)
    In_C_Out = np.dot(In_C , Out_matrix)
 
    ICO = In_C_Out.flatten()
    ICO = ICO.tolist()
 
    if ICO.count(1) == K:
      ans += 1
      
print(ans)

### FIXED CODE ###

H, W, K = list(map(int, input().split()))
 
c = [list(input()) for i in range(H)]
 
cnt = 0
for i in range(2**H):
    for j in range(2**W):
        cnt_black = 0
        for k in range(H):
            if (i >> k) & 1:
                continue
            for l in range(W):
                if (j >> l) & 1:
                    continue
                if c[k][l] == '#':
                    cnt_black += 1
        if cnt_black == K:
            cnt += 1
 
print(cnt)
n=int(input())
s = [input() for i in range(n)]
c=0
for i in range(n):
   b[i]=sorted(s[i])
   a[i]=''.join(b[i])
for i in range(n-1):
    for j in range(i+1,n):
        if a[i]==a[j]:
            c+=1
print(c)

### FIXED CODE ###

N = int(input())
S = [''.join(sorted(input().rstrip())) for _ in range(N)]
 
from collections import Counter
counter = Counter(S)
 
answer = sum(x*(x-1)//2 for x in counter.values())
print(answer)
import numpy as np
n, k = map(int, input().split())
hs = []
for i in range(n):
    hs.append(int(input()))

if list(np.diff(hs)) == list(np.zeros(n-1, dtype=int)):
    print(0)
else:
    sorted_hs = np.sort(hs)
    print(min([min(np.diff(sorted_hs[i::k-1])) for i in range(k)]))

### FIXED CODE ###

import numpy as np
n, k = map(int, input().split())
hs = []
for i in range(n):
    hs.append(int(input()))

if list(np.diff(hs)) == list(np.zeros(n-1, dtype=int)):
    print('0')
else:
    sorted_hs = np.sort(hs)
    try:
        print(min([min(np.diff(sorted_hs[i::k-1])) for i in range(k) if not len(sorted_hs[i::k-1]) == 1]))
    except:
        print('0')
n,k = map(int,input().split())
    print(n-k+1)

### FIXED CODE ###

n,k = map(int,input().split())
print(n-k+1)
a = int(input())
  b = int(input())
  
  if a*b % 2 == 0:
    print("Even")
  else:
    print("Odd")


### FIXED CODE ###

a, b = map(int, input().split())
print("Odd" if a * b % 2 else "Even")
n = int(input())
a= list(map(int,input().split()))
if n == 1:
  print(n)
  exit()

a.sort()
dp = [1] * n

def div(k):
  global dp
  if k < n-1:div(k+1)

div(1)
print(sum(dp))

### FIXED CODE ###

from collections import Counter
n = int(input())
a= list(map(int,input().split()))
if n == 1:
  print(1)
  exit()

a.sort()

c = Counter(a)
a = list(set(a))
dp = [0] * (10**6 +1)

for x in a:
  t = x * 2
  while t <= 10**6:
    dp[t] = 1
    t += x

ans = 0
for x in a:
  if (c[x] == 1) & (dp[x] == 0):
    ans += 1

print(ans)
count=0
while True:
    count=count+1
    a=input()
    b=len(a)
    if b==0:
        break
    else:
        print("Case "+str(count)+": "+str(a))



### FIXED CODE ###

count=0
while True:
    count=count+1
    a=input()
    if int(a)==0:
        break
    else:
        print("Case "+str(count)+": "+str(a))
count = 0
end=False
while(True):
	div = []
	for i in num:
		if(i % 2 == 0):
			div.append(i/2)
		else:
			print(count)
			end = True
                        break
	if(end == True):
		break
	num = div
	count = count + 1

### FIXED CODE ###

n = input()
num = [int(i) for i in input().split()]
count = 0
end=False
while(True):
	div = []
	for i in num:
		if(i % 2 == 0):
			div.append(i/2)
		else:
			print(count)
			end = True
			break
	if(end == True):
		break
	num = div
	count = count + 1
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

#pythonだとTLE/pypyだとAC
'''
r,g,b,n = iim()
ans = 0
for i in range(n//r+1):
    for j in range(n//g+1):
        num = n-i*r-j*g
        if num%b == 0 and num//b >= 0:
#            print(i,j,num//b)
            ans += 1
print(ans)
'''

#上を受けてpythonでも通るように改良
*num,n = iim()
a,b,c = map(int,sorted(num))
ans = 0
for i in range(n//c+1):
    if a!= 1:
        for j in range(n//b+1):
            num = n-i*r-j*g
            if num%a == 0 and num//a >= 0:
                ans += 1
    else:
        n -= i*c
        if n == 0:
            ans += 1
        elif n > 0:
            if n%b == 0:
                ans += n//b+1
            else:
                ans += n//b
print(ans)

### FIXED CODE ###

def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

r,g,b,n = iim()
ans = 0
for i in range(n//r+1):
    for j in range(n//g+1):
        num = n-i*r-j*g
        if num%b == 0 and num//b >= 0:
#            print(i,j,num//b)
            ans += 1
print(ans)