Harryxun/stf_run huggingface dataset:
N,K =map(int,input().split())
S =input()
lis = [[],[]]
if S[0]=="0":
    lis[1].append(0)
j = S[0]
su = 0
for i in S:
    if i ==j:
        su += 1
    else:
        lis[int(j)].append(su)
        j = i
        su = 1
lis[int(j)].append(su)
if j=="0":
    lis[1].append(0)
if len(lis[0])<=K:
    print(N)
else:
    ans = 0

    foo = sum(lis[0][0:K]) + sum(lis[1][0:K+1])
    for i in range(len(lis[0])+1-K):
        foo += lis[0][K+i] -lis[0][i] +lis[1][K+1+i] -lis[1][i]
        if ans < foo:
            ans = foo
    print(ans)

### FIXED CODE ###

N,K =map(int,input().split())
S =input()
lis = [[],[]]
if S[0]=="0":
    lis[1].append(0)
j = S[0]
su = 0
for i in S:
    if i ==j:
        su += 1
    else:
        lis[int(j)].append(su)
        j = i
        su = 1
lis[int(j)].append(su)
if j=="0":
    lis[1].append(0)
if len(lis[0])<=K:
    print(N)
else:
    ans = 0

    ans = sum(lis[0][0:K]) + sum(lis[1][0:K+1])
    foo = ans
    for i in range(len(lis[0])-K):
        foo += lis[0][K+i] -lis[0][i] +lis[1][K+1+i] -lis[1][i]
        if ans < foo:
            ans = foo
    print(ans)
N=int(input())
a=list(map(int,input().split()))
ans=[['']*30 for _ in range(N)]

if sum(a)==0:
    print(' '.join(['0']*N))
    exit(0)

i=29

while True:
    curbit=[aa%2 for aa in a]

    s=sum(curbit)

    if s==0:
        break

    if s%2==0:
        for j in range(N):
            ans[j][i]=str(curbit[j])
    else:
        for j in range(N):
            ans[j][i]=str(0 if curbit[j] else 1)



    a=[aa//2 for aa in a]
    i-=1

print(' '.join([str(int(''.join(aa),2)) for aa in ans]))

### FIXED CODE ###

N=int(input())
a=list(map(int,input().split()))
ans=[[0]*30 for _ in range(N)]

if sum(a)==0:
    print(' '.join(['0']*N))
    exit(0)

i=29

while i>=0:
    curbit=[aa%2 for aa in a]

    s=sum(curbit)

    if s%2==0:
        for j in range(N):
            ans[j][i]=curbit[j]
    else:
        for j in range(N):
            ans[j][i]=0 if curbit[j] else 1



    a=[aa//2 for aa in a]
    
    i-=1

print(' '.join([str(int(''.join([str(aaa) for aaa in aa]),2)) for aa in ans]))
n,m = map(int,raw_input().split())
a = [[0 for i in range (m)]for j in range(n)]
b = [0 for i in range(m)]
c = [0 for i in range(m)]

for i in range(n):
    x = map(int,raw_input().split())
    for j in range(m):
        a[i][j] = x[j]
for i in range(m):
    b[i] = int(raw_input())

for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]
    print c[i]

### FIXED CODE ###

n,m = map(int,raw_input().split())
a = [[0 for i in range (m)]for j in range(n)]
b = [0 for i in range(m)]
c = [0 for i in range(n)]

for i in range(n):
    x = map(int,raw_input().split())
    for j in range(m):
        a[i][j] = x[j]
for i in range(m):
    b[i] = int(raw_input())

for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]
    print c[i]
from math import ceil, floor
from decimal import Decimal

A, B = input().split()
A = int(A)
B = float(B)
B1 = int(B)
B2 = int(str(B)[-2:])

ans1 = Decimal(A) * Decimal(B1)
ans2 = Decimal(A) * Decimal(B2) // 100

ans = ans1 + ans2
print(ans)

### FIXED CODE ###

from math import ceil, floor, modf

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

B1 = int(B[:-3])
B2 = int(str(B)[-2:])

ans1 = A * B1
ans2 = A * B2 // 100

ans = ans1 + ans2
print(floor(ans))
s=list(input())
t=list(input())
ss=''.join(sorted(ss))
tt=''.join(sorted(tt,reverse=true))
if ss<tt:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

ss=input()
tt=input()
s=[]
t=[]
for i in ss:
    s.append(i)
for i in tt:
    t.append(i)
sss=sorted(s)
ttt=sorted(t)
ssss=""
tttt=""
for i in sss:
    ssss+=i
for i in range(len(ttt)):
    tttt+=ttt[len(ttt)-i-1]
if ssss<tttt:
    print("Yes")
else:
    print("No")
n,q =map(int,input().split())
s = input()
resu = [0]
ans = 0
for i in range(n):
	if s[i] == "A" and s[i+1] == "C":
		ans +=1
		resu.append(ans)
	else:
		resu.append(ans)
for i in range(q):
	l,r = map(int,input().split())
	print(resu[r-1]-resu[l-1])

### FIXED CODE ###

n,q=map(int,input().split())
s=input()
c=[0]
t=0

for i in range(0,n-1):
    if s[i]=="A" and s[i+1]=="C":
        t+=1
        c.append(t)
    else:
        c.append(t)

for i in range(q):
    l,r=map(int,input().split())
    print(c[r-1]-c[l-1])
# ABCB - Digit Sums
n = int(input())
sn = 0
for i in range(len(str(n))):
    n_temp = 0
    sn += n_temp % 10
    n_temp //= 10
print("Yes" if n % sn == 0 else "No")

### FIXED CODE ###

# ABCB - Digit Sums
n = int(input())
sn = sum(list(map(int, list(str(n)))))
print("Yes" if n % sn == 0 else "No")
n=int(input())
k=input()
l=[]
ol=len(k)
nl=len(l)
for i in range(n):
  l.append(k[i])
if(ol>n):
  print("".join(l)+"...")
elif(ol<=n):
  print(k)


### FIXED CODE ###

n=int(input())
k=input()
if(len(k)>n):
  k=k[:n]+"..."
print(k)
from operator import mul
from functools import reduce
from math import sqrt

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

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

V.sort(reverse = True)

print(sum(V[:A]) / A)

# A番目と一緒の数字の数（A個より外で）
cnt_ext = 0
for i in range(A,min(A+B,N)):
  if V[A-1] == V[i]:
    cnt_ext += 1
    
# A番目と一緒の数字の数（A個の中で）
cnt_int = 0
for i in range(0,A):
  if V[A-1] == V[i]:
    cnt_int += 1
    
#print(cnt_int, cnt_ext)
cnt_all = cnt_int + cnt_ext

ans = 0
for i in range(A,B+1):
  ans += cmb(cnt_all, cnt_int)
  cnt_int += 1
  
print(ans)

### FIXED CODE ###

from collections import Counter

from scipy.misc import comb
#a = comb(n, r, exact=True)

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

V.sort(reverse = True)
C = Counter(V)

print(sum(V[:A]) / A)

max_value = V[0]

# V[0], ... V[A-1] がすべて同じとき、そうでないときで異なる
# V[0], ... V[A-1] に異なるものが含まれると、Aコ選ぶときがMAX
key_value = V[A-1]
if key_value < max_value:
  # V[A-1]の個数と、その前に何個あるかを数えればよい
  forward_item_count = 0
  for k,v in C.items():
    if k > key_value:
      forward_item_count += v

  print(int(comb(C[key_value], A - forward_item_count, exact=True)))
  exit(0)
  
# すべて同じときはAコ～Bコ選んでも平均一緒。組み合わせ数を足していく必要性
ans = 0
cnts = C[key_value]
for i in range(A,B+1):
  ans += comb(cnts,i, exact=True)
  
print(int(ans))
# # # coding=utf-8
# # # Author: lee215

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

# 2019-03-30 20:14

A, B, C = gets()


def solve(A, B, C):
    if set([A, B, C]) < 3:
        print 'Yes'
    else:
        print 'N0'

solve(A, B, C)


### FIXED CODE ###

# # # coding=utf-8
# # # Author: lee215

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

# 2019-03-30 20:14

A, B, C = gets()


# def solve(A, B, C):
#     if len(set([A, B, C])) < 3:
#         print 'Yes'
#     else:
#         print 'No'



def solve(A, B, C):
    if len(set([A, B, C])) == 1:
        print 'Yes'
    else:
        print 'No'

solve(A, B, C)
print(sum(map(int,list(input()))))

### FIXED CODE ###

n,a,b = map(int,input().split())
r = 0
for i in range(n+1):
    wa = sum(map(int,list(str(i))))
    if a <= wa and wa <= b: r += i
print(r)
while 1:
    x = map(x, raq_input().split())
    x.sort()
    if sum(x) == 0:
        break
    else:
        print x[0],x[1]

### FIXED CODE ###

while 1:
    x = map(int, raw_input().split())
    x.sort()
    if sum(x) == 0:
        break
    else:
        print x[0],x[1]
def merge(a, left, mid, right):
    INF = int(1e+11)
    n1 = mid - left
    n2 = right - mid

    l = []
    for i in range(n1):
        l.append(a[left + i])
    r = []
    for i in range(n2):
        r.append(a[mid + i])
    l.append(INF)
    r.append(INF)
    i = 0
    j = 0

    ans = 0

    for k in range(left, right):
        ans += 1
        if l[i] <= r[j]:
            a[k] = l[i]
            i += 1
        else:
            a[k] = r[j]
            j += 1
    
    return ans


def merge_sort(a, left, right):
    ans = 0
    if left + 1 < right:
        mid = (left + right) // 2;
        ans += merge_sort(a, left, mid)
        ans += merge_sort(a, mid, right)
        ans += merge(a, left, mid, right)
    return ans


def print_list_split_whitespace(s):
    for x in s[-1]:
        print(x, " ")
    print(s[-1])

n = int(input())
s = [int(x) for x in input().split()]

ans = merge_sort(s, 0, len(s))

print_list_split_whitespace(s)
print(ans)


### FIXED CODE ###

def merge(a, left, mid, right):
    INF = int(1e+11)
    l = a[left:mid]
    r = a[mid:right]
    l.append(INF)
    r.append(INF)
    i = 0
    j = 0

    ans = 0

    for k in range(left, right):
        ans += 1
        if l[i] <= r[j]:
            a[k] = l[i]
            i += 1
        else:
            a[k] = r[j]
            j += 1
    
    return ans


def merge_sort(a, left, right):
    ans = 0
    if left + 1 < right:
        mid = (left + right) // 2
        ans += merge_sort(a, left, mid)
        ans += merge_sort(a, mid, right)
        ans += merge(a, left, mid, right)
    return ans


def print_list_split_whitespace(s):
    for x in s[:-1]:
        print(x, end=" ")
    print(s[-1])

n = int(input())
s = [int(x) for x in input().split()]

ans = merge_sort(s, 0, len(s))

print_list_split_whitespace(s)
print(ans)
'''
	We can show that if u and v belong to the same connected component, then they are friends w/ each other
	So everyone in a given connected component is friends with one another
	So everyone in a given connected component must be separated into different groups

	If we have a CC of with sz nodes in it, then we need at least sz different groups

	So, the minimum number of groups needed is max sz(CC)
'''
import sys
sys.setrecursionlimit(2*10**5)

n, m = map(int,input().split())
adj = [[] for u in range(n+1)]
for i in range(m):
	u, v = map(int,input().split())
	adj[u].append(v)
	adj[v].append(u)

vis = [False for u in range(n+1)]
def dfs(u):
	if vis[u]:
		return 0
	vis[u] = True

	sz = 1
	for v in adj[u]:
		sz += dfs(v)
	return sz

CCs = []
for u in range(1,n+1):
	if not vis[u]:
		CCs.append(dfs(u))

print(max(CCs))

### FIXED CODE ###

'''
	We can show that if u and v belong to the same connected component, then they are friends w/ each other
	So everyone in a given connected component is friends with one another
	So everyone in a given connected component must be separated into different groups

	If we have a CC of with sz nodes in it, then we need at least sz different groups

	So, the minimum number of groups needed is max sz(CC)
'''
n, m = map(int,input().split())
adj = [[] for u in range(n+1)]
for i in range(m):
	u, v = map(int,input().split())
	adj[u].append(v)
	adj[v].append(u)

vis = [False for u in range(n+1)]
def bfs(s):
	sz = 0
	queue = [s]
	ptr = 0
	
	while ptr < len(queue):
		u = queue[ptr]
		if not vis[u]:
			vis[u] = True
			sz += 1
			for v in adj[u]:
				queue.append(v) 
		ptr += 1

	return sz

CCs = []
for u in range(1,n+1):
	if not vis[u]:
		CCs.append(bfs(u))

print(max(CCs))
N = input()
N1 = input()
N2 = input()

if N==1:
  print ("Hello World")
elif N==1:
  print (N1+N2)

### FIXED CODE ###

N = int(input())

if N==1:
 print ("Hello World")
elif N==2:
 N1 = int(input())
 N2 = int(input())
 print (N1+N2)
n,y = map(int, input().split())
for i in range(min(n+1,y//10000+1)):
    for j in range(min(n-i+1,y/1000+1)):
        c = n-i-j
        if c >= 0 and 10000 * i + 5000 * j + 1000 * c == y:
            print(i,j,c)
            exit()
print(-1,-1,-1)

### FIXED CODE ###

n,y = map(int, input().split())
for i in range(min(n+1, y//10000+1)):
    for j in range(min(n-i+1, y//1000+1)):
        c = n-i-j
        if 10000 * i + 5000 * j + 1000 * c == y:
            print(i,j,c)
            exit()
print(-1,-1,-1)
import sys
H,W = input().split()
H = int(H)
W = int(W)
s = []

s.append("."*(W+1))
for i in range(H):
    s.append("."+input()+".")

s.append("."*(W+2))

for j in range(1,1+H):
    for i in range(1,1+W):
#        print(i,j,s[i][j])
        if s[i][j] == "#":
            if s[i][j-1] != "#" and s[i][j+1] != "#" and s[i-1][j] != "#" and s[i+1][j] != "#":
                print("No")
#                print(s[i][j-1],s[i][j+1], s[i-1][j],s[i+1][j])
                sys.exit()



print("Yes")


### FIXED CODE ###

import sys
H,W = input().split()
H = int(H)
W = int(W)
s = []

s.append("."*(W+2))
for i in range(H):
    s.append("."+input()+".")

s.append("."*(W+2))


for i in range(1,1+H):
    for j in range(1,1+W):
#        print(j,i)
        if s[i][j] == "#":
            if s[i][j-1] != "#" and s[i][j+1] != "#" and s[i-1][j] != "#" and s[i+1][j] != "#":
                print("No")

                sys.exit()

print("Yes")
from collections import Counter


N, M = map(int, input().split())

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

A.sort()
B.sort()
A_cnt = Counter(A)
B_cnt = Counter(B)
if len(A) > 0:
    if max(A_cnt.values()) > 1:
        print(0)
        exit()
if len(B) > 0:
    if max(B_cnt.values()) > 1:
        print(0)
        exit()
if A[N - 1] != N * M and B[M - 1] != N * M:
    print(0)
    exit()

a = 0
b = 0
i = 1
C = [0] * (N * M)
while i <= N * M:
    if i == A[a] and i == B[b]:
        C[i - 1] = 1
        a += 1
        b += 1
    elif i == A[a] and i != B[b]:
        C[i - 1] = M - b
        a += 1
    elif i != A[a] and i == B[b]:
        C[i - 1] = N - a
        b += 1
    else:
        C[i - 1] = (N - a) * (M - b) - (N * M - i)
    i += 1

ans = 1
mod = 10 ** 9 + 7
for c in C:
    ans = (ans * c) % mod

print(ans)


### FIXED CODE ###

from collections import Counter


N, M = map(int, input().split())

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

A.sort()
B.sort()
A_cnt = Counter(A)
B_cnt = Counter(B)
if len(A) > 0:
    if max(A_cnt.values()) > 1:
        print(0)
        exit()
if len(B) > 0:
    if max(B_cnt.values()) > 1:
        print(0)
        exit()
if A[N - 1] != N * M or B[M - 1] != N * M:
    print(0)
    exit()

a = 0
b = 0
i = 1
C = [0] * (N * M)
while i <= N * M:
    if i == A[a] and i == B[b]:
        C[i - 1] = 1
        a += 1
        b += 1
    elif i == A[a] and i != B[b]:
        C[i - 1] = M - b
        a += 1
    elif i != A[a] and i == B[b]:
        C[i - 1] = N - a
        b += 1
    else:
        C[i - 1] = (N - a) * (M - b) - (N * M - i)
    i += 1

ans = 1
mod = 10 ** 9 + 7
for c in C:
    ans = (ans * c) % mod

print(ans)
n=int(input())
y=int(input())
a=-1
b=-1
c=-1
for i in range(n+1):
  for j in range(n-i+1):
      if 10000*i+5000*j+1000*(n-i-j+1)==y:
        a=i
        b=j
        c=n-i+j+1
        break

print(a b c)        

### FIXED CODE ###

n, y = (int(i) for i in input().split())  
a=-1
b=-1
c=-1
for i in range(n+1):
  for j in range(n-i+1):
      if 10000*i+5000*j+1000*(n-i-j)==y:
        a=i
        b=j
        c=n-i-j
        break

print(a ,b ,c)
import sys
S = sorted(set(input()))

alp = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i in range(len(alp)):
  if S[i] != alp[i]:
    print(alp[i])
    sys.exit()

print('None')


### FIXED CODE ###

import sys
S = sorted(set(input()))

alp = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i in range(len(alp)):
  if (i>len(S)-1):
    print(alp[i])
    sys.exit()
  elif S[i] != alp[i]:
    print(alp[i])
    sys.exit()

print('None')
n = int(input())
alist = [int(input())-1 for _ in range(n)]

now = 0
count = 0
while True:
    if now == 1:
        print(count)
        break
    elif c >= n:
        print(-1)
        break
    else:
        count += 1
        now = alist[now]

### FIXED CODE ###

n = int(input())
alist = [int(input())-1 for _ in range(n)]

now = 0
count = 0
while True:
    if now == 1:
        print(count)
        break
    elif count >= n:
        print(-1)
        break
    else:
        count += 1
        now = alist[now]
N = int(input())
X = int(input())
T = int(input())
print(ceil(N / X) * T)

### FIXED CODE ###

N, X, T = map(int, input().split())
if N % X == 0:
  print(int(N / X) * T)
else:
  print(int(N / X + 1) * T)
I=int(input().split())
x=int(input().split())
y=int(input().split())

if (min(y,I[3])-max(x,I[2]))>0:
    print('No War')
    
else :
    print('War')

### FIXED CODE ###

x=input().split()

for i in range(2):
    x[i]=int(x[i])

y=[0]*3
y[0]=x[0]+x[1]
y[1]=x[0]-x[1]
y[2]=x[0]*x[1]
 
print(max(y))
n = int(input())
a = [i for i in map(int, input().split())]

if a.count(0) != 0:
    print(0)
else:
    result = 1
    for i in range(n):
        result *= a[i]
        if result > (10**18):
            print(-1)
            break
        else:
            continue

print(result)

### FIXED CODE ###

n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)
from collections import deque
n,m=map(int,input().split())#n:num m:ticket
a=[int(_) for _ in input().split()]
a=deque(a)
for i in range(m):
	a[a.index(max(a))]=max(a)//2
print(sum(a))

### FIXED CODE ###

from heapq import heapify,heappop,heappush
n,m=map(int,input().split())#n:num m:ticket
a=[-int(_) for _ in input().split()]
heapify(a)
for i in range(m):
	num=heappop(a)*-1
	heappush(a,(num//2)*-1)
print(sum(a)*-1)
import math

A, B, H, M = input().split()
# print(A, B, H, M)

def get_point(radians_theta, r):
    # 0° -> x:0, y=r とみなす
    # radians_theta 0 ~ 360
    x = r * math.sin(math.radians(radians_theta))
    y = r * math.cos(math.radians(radians_theta))
    return x, y

def calc_rad_big_hand(H, M):
    # 長針
    return H * 30 + M / 2

def calc_rad_little_hand(M):
    # 短針
    return M * 6

def calc_result(A,B,H,M):
    H = int(H)
    M = int(M)
    big_hand_rad = calc_rad_big_hand(H, M)
    little_hand_rad = calc_rad_little_hand(M)
    big_x, big_y = get_point(big_hand_rad, A)
    little_x, little_y = get_point(little_hand_rad, B)
    return math.sqrt((big_x - little_x)**2 + (big_y-little_y)**2)

print(calc_result(A,B,H,M))


### FIXED CODE ###

import math

A, B, H, M = input().split()
# print(A, B, H, M)

def get_point(radians_theta, r):
    # 0° -> x:0, y=r とみなす
    # radians_theta 0 ~ 360
    # print(radians_theta, r)
    x = r * math.sin(math.radians(radians_theta))
    y = r * math.cos(math.radians(radians_theta))
    return x, y

def calc_rad_big_hand(H, M):
    # 長針
    return H * 30 + M / 2

def calc_rad_little_hand(M):
    # 短針
    return M * 6

def calc_result(A,B,H,M):
    H = int(H)
    M = int(M)
    A = int(A)
    B = int(B)
    big_hand_rad = calc_rad_big_hand(H, M)
    little_hand_rad = calc_rad_little_hand(M)
    big_x, big_y = get_point(big_hand_rad, A)
    little_x, little_y = get_point(little_hand_rad, B)
    return math.sqrt((big_x - little_x)**2 + (big_y-little_y)**2)

print(calc_result(A,B,H,M))
a = list[map(int, input().split())]
if a[0] == a[1]:
  print("Yes")
els:
  print("No")

### FIXED CODE ###

n = input()
if n[0] == n[2]:
  print("Yes")
else:
  print("No")
R,G=map(int,input().split())
print((2*G)-R)

### FIXED CODE ###

r=int(input())
g=int(input())
print(2*g-r)
n,k=map(int,input().split())
s=list(map(int,str(input())))
if s[0]==1:
  one_st=[0]+[i+1 for i in range(n-1) if s[i]==0 and s[i+1]==1]
  zero_st=[i+1 for i in range(n-1) if s[i]==1 and s[i+1]==0]
else:
  one_st=[i+1 for i in range(n-1) if s[i]==0 and s[i+1]==1]
  zero_st=[0]+[i+1 for i in range(n-1) if s[i]==1 and s[i+1]==0]
if s[n-1]==1:
  one_en=[i for i in range(n-1) if s[i]==1 and s[i+1]==0]+[n-1]
  zero_en=[i for i in range(n-1) if s[i]==0 and s[i+1]==1]
else:
  one_en=[i for i in range(n-1) if s[i]==1 and s[i+1]==0]
  zero_en=[i for i in range(n-1) if s[i]==0 and s[i+1]==1]+[n-1]
if len(one_st) <= k:
  x=n
else:
  y=[one_en[i+k]-one_st[i] for i in range(len(one_st)-k+1)]
  y=y+[one_en[k-1],one_st[len(one_st)-k-1]]
  x=max(y)
print(x)

### FIXED CODE ###

n,k=map(int,input().split())
s=list(map(int,str(input())))
if s[0]==1:
  one_st=[0]+[i+1 for i in range(n-1) if s[i]==0 and s[i+1]==1]
  zero_st=[i+1 for i in range(n-1) if s[i]==1 and s[i+1]==0]
else:
  one_st=[i+1 for i in range(n-1) if s[i]==0 and s[i+1]==1]
  zero_st=[0]+[i+1 for i in range(n-1) if s[i]==1 and s[i+1]==0]
if s[n-1]==1:
  one_en=[i for i in range(n-1) if s[i]==1 and s[i+1]==0]+[n-1]
  zero_en=[i for i in range(n-1) if s[i]==0 and s[i+1]==1]
else:
  one_en=[i for i in range(n-1) if s[i]==1 and s[i+1]==0]
  zero_en=[i for i in range(n-1) if s[i]==0 and s[i+1]==1]+[n-1]
if len(zero_st) <= k:
  x=n
else:
  y=[one_en[i+k]-one_st[i]+1 for i in range(len(zero_st)-k+1) if i+k+1<=len(one_en)]
  y=y+[one_en[k-1]+1,n-one_st[len(one_st)-k]]
  x=max(y)
print(x)
a = int(input()) #500円
b = int(input()) #100円
c = int(input()) #50円
x = int(input())
 
count = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if x == 500 * i + 100 * j + 50 * k:
        count += 1
print(count)     

### FIXED CODE ###

x = int(input())
a = int(input())
b = int(input())
print((x -a) % b)
s = set(input())
abc = set('abcdefghijklmnopqrstuvwxyz')
nots = abc.difference(s)
print(min(nots))

### FIXED CODE ###

s = set(input())
abc = set('abcdefghijklmnopqrstuvwxyz')
nots = abc.difference(s)
if len(nots) == 0:
  print('None')
else:
  print(min(nots))
N,C = map(int,input().split()) 
XV = [[0,0]] + [[int(i) for i in input().split()] for _ in range(N)] + [[C,0]]

Sum_left = [0] * (N+1)
Sum_right = [0] * (N+1)
for i in range(N):
    Sum_left[i+1] = Sum_left[i] + XV[i+1][1]
    Sum_right[i+1] = Sum_right[i] + XV[N-i][1]

ans = 0
for i in range(N+1):
    for j in range(N+1-i):
        ans = max(ans, Sum_left[i] + Sum_right[j] - XV[i][0] - 2 * (C - XV[N+1-j][0]), Sum
_left[i] + Sum_right[j] - 2 * XV[i][0] - (C - XV[N+1-j][0]))

print(ans)


### FIXED CODE ###

N,C = map(int,input().split())
XV = [[0,0]] + [[int(i) for i in input().split()] for _ in range(N)] + [[C,0]]

Sum_left = [0] * (N+1)
Sum_right = [0] * (N+1)
for i in range(N):
    Sum_left[i+1] = Sum_left[i] + XV[i+1][1]
    Sum_right[i+1] = Sum_right[i] + XV[N-i][1]

Sum_right_maxA = [0] * (N+1)
Sum_right_maxB = [0] * (N+1)
for i in range(1,N+1):
    Sum_right_maxA[i] = max(Sum_right_maxA[i-1], Sum_right[i] - 2 * (C - XV[N+1-i][0]))
    Sum_right_maxB[i] = max(Sum_right_maxB[i-1], Sum_right[i] - (C - XV[N+1-i][0]))

ans = 0
for i in range(N+1):
    ans = max(ans, Sum_left[i] + Sum_right_maxA[N-i] - XV[i][0], Sum_left[i] + Sum_right_maxB[N-i] - 2*XV[i][0])
print(ans)
N = int(raw_input())
a = raw_input()

b = a.split()
c = [0 for i in range(9)]
for i in range(N):
	b[i] = int(b[i])
	if 1 <= b[i] <=399:
		c[0] = 1
	elif 400 <= b[i] <= 799:
		c[1] = 1
	elif 800 <= b[i] <=1199:
		c[2] = 1
	elif 1200<= b[i] <= 1599:
		c[3] = 1
	elif 1600 <= b[i] <= 1999:
		c[4] = 1
	elif 2000 <= b[i] <= 2399:
		c[5] = 1
	elif 2400 <= b[i] <= 2799:
		c[6] = 1
	elif 2800 <= b[i] <= 3199:
		c[7] = 1
	else:
		c[8] += 1

max = 0
min = 0
for i in range(9):
	max = max + c[i]

min = max - c[8]

print (min,max)

### FIXED CODE ###

a= raw_input().split()

sum = int(a[0])*100 + int(a[1])*10 + int(a[2])

if sum%4 == 0:
	print "YES"
else:
	print "NO"
import math
N, D = map(int, input().split())
x = [list(map(int,input().split())) for i in range(N)]
tmp = 0
ans = 0
for i in range(N):
    for j in range(i + 1,N):
        for d in range(D):
            tmp += (x[i][d] - x[j][d])**2
        tmp = math.sqrt(tmp)
        if tmp.is_integer():
            ans += 1
        tmp = 0
print(ans)

### FIXED CODE ###

L, R = map(int, input().split())
ans = 2019
if R - L >= 2019:
    print(0)
else:
    for i in range(L, R + 1):
        for j in range(i + 1, R + 1):
            ans = min(ans, (i * j) % 2019)
    print(ans)