Harryxun/stf_run huggingface dataset:
import numpy as np

def solve():
    
    n = int(input())
    
    divisors = np.zeros(n+1, np.int64)
    
    for i in range(1, n+1):
        for j in range(i, n+1, i):
            divisors[j] += 1
    #print(divisors)
    
    ans = 0
    for k in range(n+1):
        ans += (k * divisors[k])
    
    print(ans)

solve()


### FIXED CODE ###

import numpy as np
from numba import jit

@jit
def solve():
    
    n = int(input())
    
    divisors = np.zeros(n+1, np.int64)
    
    for i in range(1, n+1):
        for j in range(i, n+1, i):
            divisors[j] += 1
    #print(divisors)
    
    ans = 0
    for k in range(n+1):
        ans += (k * divisors[k])
    
    print(ans)

solve()
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
 
 
def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    
    ans = 0
    ruiseki = [0]
    d = defaultdict(int)
    d[0]=1
    for i in range(n):
        if i - k + 1>= 0:
            d[ruiseki[i - k+1]]-=1
        ruiseki.append((ruiseki[i] + a[i] - 1)%k)
        ans += d[ruiseki[i+1]]
        d[ruiseki[i + 1]] += 1
    print(ans)
 
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

from collections import defaultdict 
def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    
    ans = 0
    ruiseki = [0]
    d = defaultdict(int)
    d[0]=1
    for i in range(n):
        if i - k + 1>= 0:
            d[ruiseki[i - k+1]]-=1
        ruiseki.append((ruiseki[i] + a[i] - 1)%k)
        ans += d[ruiseki[i+1]]
        d[ruiseki[i + 1]] += 1
    print(ans)
 
 
if __name__ == '__main__':
    main()
N, M, C = int(input())
B = list(map(int, inpot().split()))
count = 0
for j in range(N)
    A = list(map(int, input().split()))

for i in range(M):
    calc = A[i] * B[i]
    if C + calc > 0
        count+=1

print(count)      
      
  


### FIXED CODE ###

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
calc = 0
ans = 0

for i in range(N):
    A = list(map(int,input().split()))
    calc = 0
    for j in range(M):
        calc += A[j] * B[j]

    if calc + C > 0:
        ans += 1

print(ans)
while True:
    n,x = map(int,raw_input().split())
    if n==0 and x==0:
        break
    ct = 0
    for i in range(1, n+1):
       for j in range(i+1, n+1):
           for k in range(j+1, n+1):
               if (i+j+k) == x:
                   ct += 1
    print ct
~

### FIXED CODE ###

while True:
    n,x = map(int,raw_input().split())
    if n==0 and x==0:
        break
    ct = 0
    for i in xrange(1, n+1):
       for j in xrange(i+1, n+1):
           for k in xrange(j+1, n+1):
               if (i+j+k) == x:
                   ct += 1
    print ct
s=input()
mod=10**9+7
retnum={"?":0,"A":1,"B":2,"C":3}
count=[[0 for i in range(len(s))] for j in range(4)]
for i in range(len(s)):
    for j in range(4):
        if retnum[s[i]] == j:
            count[j][i]=count[j][i-1]+1
        else:
            count[j][i]=count[j][i-1]
ans=0
for i in range(1,len(s)-1):
    if s[i]=="B" or s[i]=="?":
        ans+=((3**(count[0][i-1]-1))*count[0][i-1]+(3**count[0][i-1])*count[1][i-1])*(3**(count[0][-1]-count[0][i]-1)*(count[0][-1]-count[0][i])+(3**(count[0][-1]-count[0][i]))*(count[3][-1]-count[3][i]))
        ans%=mod
print(ans)

### FIXED CODE ###

s=input()
mod=10**9+7
retnum={"?":0,"A":1,"B":2,"C":3}
count=[[0 for i in range(len(s))] for j in range(4)]
for i in range(len(s)):
    for j in range(4):
        if retnum[s[i]] == j:
            count[j][i]=count[j][i-1]+1
        else:
            count[j][i]=count[j][i-1]
ans=0
g=[1]*100002
for i in range(1,100002):
    g[i]=g[i-1]*3
    g[i]%=mod
for i in range(1,len(s)-1):
    if s[i]=="B" or s[i]=="?":
        ans+=(g[max(0,count[0][i-1]-1)]*count[0][i-1]+g[count[0][i-1]]*count[1][i-1])*(g[max(0,count[0][-1]-count[0][i]-1)]*(count[0][-1]-count[0][i])+g[count[0][-1]-count[0][i]]*(count[3][-1]-count[3][i]))
        ans%=mod
print(ans)
import collections
import sys
import math
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
H,W,M=map(int,input().split())
A=list()
B=list()
for i in range(M):
  a,b=map(int,input().split())
  A.append(a)
  B.append(b)
c = collections.Counter(A)
s=c.most_common()
k=s[0][0]
t=s[0][1]
L=list()
for i in range(M):
  if A[i]!=k:
    L.append(B[i])
c = collections.Counter(L)
s=c.most_common()
ans=s[0][1]+t

c = collections.Counter(B)
s=c.most_common()
k=s[0][0]
t=s[0][1]
L=list()
for i in range(M):
  if B[i]!=k:
    L.append(A[i])
c = collections.Counter(L)
s=c.most_common()
ans=max(ans,s[0][1]+t)
print(ans)

### FIXED CODE ###

import collections
import sys
import math
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
H,W,M=map(int,input().split())
A=list()
B=list()
for i in range(M):
  a,b=map(int,input().split())
  A.append(a)
  B.append(b)
c = collections.Counter(A)
s=c.most_common()
k=s[0][0]
t=s[0][1]
L=list()
for i in range(M):
  if A[i]!=k:
    L.append(B[i])
c = collections.Counter(L)
s=c.most_common()
if len(s)!=0:
  ans=s[0][1]+t
else:
  ans=t
c = collections.Counter(B)
s=c.most_common()
k=s[0][0]
t=s[0][1]
L=list()
for i in range(M):
  if B[i]!=k:
    L.append(A[i])
c = collections.Counter(L)
s=c.most_common()
if len(s)!=0:
  q=s[0][1]+t
else:
  q=t
ans=max(ans,q)
print(ans)
n, k = map(int, input().split())
p = list(map(int, input().split()).sort()
print(sum(p[:k]))


### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))

p = sorted(p)

print(sum(p[:k]))
import numpy as np

n = int(input())
a = list(map(int ,input().split()))
p = np.prod(a)
if len(p)>=19:
    print(-1)
else:
    print(p)

### FIXED CODE ###

a,b = map(int ,input().split())
print(a*b)
import sys
input = sys.stdin.readline()
n = int(input())
a = list(map(int, input().split()))
ans = 1 
if 0 in a:
    print(0)
    sys.exit()
for i in a:
    ans *= i
    if ans > 10**18:
        ans = -1
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
ans = 1 
if 0 in a:
    print(0)
    sys.exit(0)
for i in a:
    ans *= i
    if ans > 10**18:
        print(-1)
        sys.exit(0)
print(ans)
n = int(raw_input())
a = raw_input().split()
max = a[0]
min = a[0]
sum = 0

for i in range(n):
  if max<a[i]: 
    max = a[i]
  if min>a[i]:
    min = a[i]
  sum += a[i]

print "%d %d %d" %(max, min ,sum)

### FIXED CODE ###

n = int(raw_input())
a = map(int, raw_input().split())

print "%d %d %d" %(min(a), max(a), sum(a))
MOD = 1000000007

from math import gcd

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

LCM = A[0]
for i in range(0,N-1,1):#O(nlogA)
    LCM = LCM*A[i+1]//gcd(A[i+1],LCM)
B = [0 for i in range(0,N,1)]
for i in range(0,N,1):#O(n)
    B[i]=(LCM*pow(A[i],MOD-2,MOD))%MOD

ans = 0
for i in range(0,N,1):
    ans = (B[i]%MOD + ans%MOD)%MOD

print(ans)

### FIXED CODE ###

def lcm(X,Y):
    x=X
    y=Y
    if y>x:
        x,y=y,x
    while x%y!=0:
        x,y=y,x%y
    return X*Y//y

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

LCM = A[0]
for i in range(0,N-1,1):
    LCM = lcm(LCM,A[i+1])
B = [0 for i in range(0,N,1)]
for i in range(0,N,1):
    B[i]= (LCM%MOD)*pow(A[i],MOD-2,MOD)%MOD

ans = 0
for i in range(0,N,1):
    ans = (B[i] + ans)%MOD

print(ans)
while True:
      n, m = map(int, raw_input().split())
      if n == 0 and m == 0:
            break
      p = [1 for i in range(n)]
      pn = n; count = 0
      while pn > 1:
            for i in range(n):
                  if p[i] == 1:
                        count += 1
                        if count == m:
                              p[i] = 0
                              pn -= 1
                              count = 0
      print p.index(1)+1

### FIXED CODE ###

while True:
      n, m = map(int, raw_input().split())
      if n == 0 and m == 0:
            break
      p = [ i+1 for i in range(n) ]
      np = n; a = 0
      while np > 1:
            a = (a+m-1)%len(p)
            p.pop(a)
            np -= 1
      print p[0]
s=list(input())
for i in range(len(s)-2):
    if s[i]==s[i+1]:
        print("{} {}".format(i+1,i+2))
        break
    elif s[i]==s[i+2]:
        print("{} {}".format(i+1,i+3))
        break
else:
    if s[i+1]==s[i+2]:
        print("{} {}".format(i+2,i+3))
    else:
        print("-1 -1")

### FIXED CODE ###

s=list(input())
j=len(s)-2
for i in range(j):
    if s[i]==s[i+1]:
        print("{} {}".format(i+1,i+2))
        break
    elif s[i]==s[i+2]:
        print("{} {}".format(i+1,i+3))
        break
else:
    if s[j]==s[j+1]:
        print("{} {}".format(j+1,j+2))
    else:
        print("-1 -1")
n = int(input)
print((1000 - (n % 1000)) % 1000)

### FIXED CODE ###

n = int(input())
print((1000 - (n % 1000)) % 1000)
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in range(n):
  sum = sum + 1/data[i]
print(1/sum)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
sum=0
for i in a:
  sum = sum + 1/i
print(1/sum)
n = int(input())
a = list(map(int, input().split()))
b = [0 for i in range(n)]
s = 0

for i in range(n):
    b[a[i]-1] += 1

for i in range(n):
    s += (b[i]*(b[i]-1))//2

for i in range(n):
    print(s-b[a[i]-1]+1)

### FIXED CODE ###

n = int(input())
print(n*n*n/27)
n = int(input())
a = [ int(i) for i in input().split(" ")]

INF = 10000000000
dp = [ INF for i in range(len(a))]
dp[0] = 0

def frog(i):
  if dp[i] < INF: return dp[i]
  
  if i == 0: return 0

  res = INF
  res = min(res, frog(i-1) + abs(a[i-1] - a[i]))
  if i > 1: 
    res = min(res, frog(i-2) + abs(a[i-2] - a[i]))

  dp[i] = res
  return res

print(frog(n-1))

### FIXED CODE ###

n = int(input())
a = [ int(i) for i in input().split(" ")]

dp = [ -1 for i in range(len(a))]
dp[0] = 0

for i in range(1, len(a)):
  onestep = dp[i-1] + abs(a[i-1] - a[i])
  if i - 2 < 0:
    twostep = onestep
  else:
    twostep = dp[i-2] + abs(a[i-2] - a[i])
  
  dp[i] = min(onestep, twostep)

print(dp[-1])
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N, Z, W = map(int, input().split())

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

print(abs(A[-1] - W), abs(A[-1] - A[-2]))


### FIXED CODE ###

import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N, Z, W = map(int, input().split())

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

if N == 1:
    print(abs(A[-1] - W))
else:
    print(max(abs(A[-1] - W), abs(A[-1] - A[-2])))
N, X, Y = map(int, input().split())
c = [0 for i in range(N)]
print(c)
for i in range(1,N):
  for j in range(i+1,N+1):
    x = abs(X-i)
    y = abs(Y-j)
    a = min(x+y+1,j-i)
    c[a]+=1

for i in range(1,N+1):
  ans = c[i]
  print(ans)
  


### FIXED CODE ###

N, X, Y = map(int, input().split())
c = [0 for i in range(N)]
for i in range(1,N):
  for j in range(i+1,N+1):
    x = abs(X-i)
    y = abs(Y-j)
    a = min(x+y+1,j-i)
    c[a]+=1

for i in range(1,N):
  ans = c[i]
  print(ans)
import sys

n = int(input())

node_ls = {i: Node(-1, i, []) for i in range(n)}
_map = {j: [0 for i in range(n)] for j in range(n)}
already = set()
color_ls = [-1 for i in range(n)]
for i in range(n - 1):
    u, v, w = [int(i) for i in sys.stdin.readline().split()]
    u -= 1
    v -= 1
    if i == 0:
        color_ls[u] = 0
    _map[u][v] = w
    _map[v][u] = w
    if u not in already and v in already:
        node_ls[u].parent = v
        node_ls[v].child.append(u)
        color_ls[u] = 0 if (w % 2 == 0 and color_ls[v] == 0) or (w % 2 == 1 and color_ls[v] == 1) else 1
    else:
        node_ls[v].parent = u
        node_ls[u].child.append(v)
        color_ls[v] = 0 if (w % 2 == 0 and color_ls[u] == 0) or (w % 2 == 1 and color_ls[u] == 1) else 1
    already.update({u, v})
for c in color_ls:
    print(c)

### FIXED CODE ###

import sys
from collections import deque

n = int(input())

color_ls = {i: None for i in range(n)}
dict_map = {i : [] for i in range(n)}
already = set()
for i in range(n - 1):
    u, v, w = [int(i) for i in sys.stdin.readline().split()]
    u -= 1
    v -= 1
    if i == 0:
        root = u
    dict_map[u].append([v, w])
    dict_map[v].append([u, w])
    already.update({u, v})
color_ls[root] = 0
cur = root
already.clear()
que = deque()
while True:
    candidate = dict_map[cur]
    for cand, w in candidate:
        if cand in already:
            continue
        already.add(cand)
        que.append(cand)
        if w % 2 == 0:
            color_ls[cand] = 0 if color_ls[cur] == 0 else 1
        else:
            color_ls[cand] = 1 if color_ls[cur] == 0 else 0
    if len(que) == 0 or len(already) == n:
        break
    cur = que.popleft()

for i in range(n):
    print(color_ls[i])
D=int(input())
str="Christmas"
while D<25:
  	str+=" EVE"
    D+=1
print(str)

### FIXED CODE ###

D = int(input())
str = "Christmas"
while D < 25:
    str += " Eve"
    D += 1
print(str)
a, b = map(int, input().split())
print(int(a*b))

### FIXED CODE ###

a, b = map(str, input().split())
a = int(a)
b1, b2 = b.split('.')
b = int(b1) * 100 + int(b2)
ans = a * b
print(ans//100)
import os,io
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n=int(input())
m=[]
for i in range(n):
  a=list(map(int,input().split()))
  a.reverse()
  m.append(a)
ans=0
count=0
failflag=0
previous=set()
for i in range(n):
  previous.add(i)
while count<(n*(n-1)):
  ans+=1
  tempcount=count
  r=set()
  for i in previous:
    if m[i]:
      t=m[i][-1]
      if m[t-1]:
        if m[t-1][-1]==i+1:
          count+=1
          r.add(i)
          r.add(t-1)
  previous=()
  for k in r:
    m[k].pop()
    previous.add(k)
  if tempcount==count:
    failflag=1
    break
if failflag==1:
  print(-1)
else:
  print(ans)
    

### FIXED CODE ###

import os,io
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n=int(input())
m=[]
for i in range(n):
  a=list(map(int,input().split()))
  a.reverse()
  m.append(a)
ans=0
count=0
failflag=0
previous=set()
for i in range(n):
  previous.add(i)
while count<(n*(n-1)):
  ans+=1
  tempcount=count
  r=set()
  for i in previous:
    if m[i]:
      t=m[i][-1]
      if m[t-1]:
        if m[t-1][-1]==i+1:
          count+=1
          r.add(i)
          r.add(t-1)
  previous=set()
  for k in r:
    m[k].pop()
    previous.add(k)
    if m[k]:
      previous.add(m[k][-1]-1)
  if tempcount==count:
    failflag=1
    break
if failflag==1:
  print(-1)
else:
  print(ans)
n=int(imput())

ans=0
for i in range(n):
  i=i+1
  a=i
  y=n//i

  ans+=(i*y*(y+1)/2)



print(ans)

### FIXED CODE ###

n=int(input())
 
ans=0
for i in range(n):
  i=i+1
  a=i
  y=n//i
 
  ans+=(i*y*(y+1)/2)
 
 
 
print(int(ans))
x,y=map(int,input().split())
s0=1<<(x-1)|1<<(y-1)
s1=sum(list(map(lambda x:1<<(x-1),[1,3,5,7,8,10,12])))&s0
s2=sum(list(map(lambda x:1<<(x-1),[4,6,9,11])))&s0
s3==sum(list(map(lambda x:1<<(x-1),[2])))&s0

if s1==s0 or s2==s0 or s3==s0:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

x,y=map(int,input().split())
s0=1<<(x-1)|1<<(y-1)
s1=sum(list(map(lambda x:1<<(x-1),[1,3,5,7,8,10,12])))&s0
s2=sum(list(map(lambda x:1<<(x-1),[4,6,9,11])))&s0
s3=sum(list(map(lambda x:1<<(x-1),[2])))&s0

if s1==s0 or s2==s0 or s3==s0:
  print('Yes')
else:
  print('No')
H, W = map( int, input().split() )
abc = [ chr(i) for i in range( 65, 65+26 ) ]
for i in range(H) : 
    s = list( map( str, input().split() ) )
    if "snuke" in s : 
        w = abc[ s.index[ "snuke" ] ]
        h = i + 1
        break
print( w + str( h ) )

### FIXED CODE ###

H, W = map( int, input().split() )
s = [ list( map( str, input().split() ) ) for i in range(H) ] 
for i in range(H) : 
    for j in range(W) : 
       if s[i][j] == "snuke" : 
           w = chr( j + ord( "A" ) )
           h = i + 1
           print( w + str( h ) )
           exit()
class SegmentTree:
    def __init__(self, n):
        n_ = 1
        while n_ < n: n_ *= 2
        self.n = n_
        self.data = [(0, -n_-1)] * (2*n_)

    def add(self, k, a):
        idx = k + (self.n-1)
        data = self.data
        data[idx] = (data[idx][0] + a, -k)
        while idx:
            idx = (idx - 1) / 2
            data[idx] = max(data[2*idx+1], data[2*idx+2])

    def get(self):
        return self.data[0]

inputs = lambda: map(int, raw_input().split())
n, q = inputs()
st = SegmentTree(n)
for t in xrange(q):
    a, v = inputs()
    st.add(a, v)

    p, q = st.get()
    print -q, p

### FIXED CODE ###

from heapq import heappush, heappop
inputs = lambda: map(int, raw_input().split())
n, q = inputs()
n += 1
que = [(0, 1, -1)]
data = [0] * n
T = [-1] * n
for t in xrange(q):
    a, v = inputs()
    data[a] += v
    T[a] = t

    heappush(que, (-data[a], a, t))
    v, k, p = que[0]
    while T[k]!=p:
        heappop(que)
        v, k, p = que[0]
    print k, -v
H = int(input())
count = 0
ans = 0
while H>1:
  H = H//2
  ans += 2**i
  count += 1
ans += 2**i
print(ans)

### FIXED CODE ###

H = int(input())
count = 0
ans = 0
while H>1:
  H = H//2
  ans += 2**count
  count += 1
ans += 2**count
print(ans)
N=int(input())
S=input()

A=[0 for i in range(length-max_num)]

for c in range(len(S)):

    for i in range(1,length-max_num):
        if i+ A[i] < c+A[c]:
            A[i] = A[i-c]
        else:
            j=max(0,c+A[c]-i)
            while i+j<length and subS[j]==subS[i+j]:
                j+=1
            A[i]=j
            if max_num<A[i] and i>=A[i]:
                max_num = A[i]
print(max_num)

### FIXED CODE ###

N=int(input())
S=input()

# Zアルゴリズムで解く

def z_algorithm(S):
    N=len(S)
    A = [N] + [0]*(N-1)
    
    left=1
    length=0
    
    while left < N:
        
        # prefixが同じ間length加算
        while left + length < N and S[length] == S[left+length]:
            length += 1
        
        # prefixの一致数保存
        A[left] = length
        
        # 一文字一致していなければ戻る
        if length == 0:
            left+=1
            continue
        
        # lengthの分だけleftとindexの間を埋めていく(はみ出ていないとこまで)
        k=1
        while k+left < N and k+A[k]<length:
            A[left+k] = A[k]
            k += 1
            
        left += k
        length -= k
    return A

c=0
max_num=0
for sub in range(len(S)):
    subS = S[sub:]
    A=z_algorithm(subS)
    for i,a in enumerate(A):
        if i>=a and max_num<a:
            max_num=a
print(max_num)
import math

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

proba = 0

for i in range(1, k):
  n_coin = int(math.log(k/i,2)) + 1
  print(i, n_coin)
  proba += float(1)/n*((0.5)**n_coin)

if n >= k:
	proba += float(n-k+1)/n


### FIXED CODE ###

inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K-1:
    ret += s[i]
  else:
    ret += s[i].lower()

print(ret)
n = int(input())

c = n // 4

ans = 0

for i in range(c+1):
    d = (n - i*4) // 7
    for v in range(d+1):
        buy = i*4 + v*7
        check = buy - n
        
        if check == 0:
            ans = "Yes"
            break
    if ans == "Yes":
        break
        

if ans == "Yes":
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n, k = list(map(int, input().split(" ")))
ans = n % k
if ans > 0:
    print(1)
else:
    print(0)
trial = int(input())
for t in range(trial):
    housecnt,elec = (int(n) for n in input().split(" "))
    house = [int(n) for n in input().split(" ")]
    maxlist = []
    for h in range(housecnt-1):
        maxlist.append(house[h+1]-house[h])
    maxlist.sort()
    for p in range(min(housecnt,elec-1)):
        maxlist.pop()
    print(sum(maxlist))

### FIXED CODE ###

trial = int(input())
for t in range(trial):
    housecnt,elec = (int(n) for n in input().split(" "))
    house = [int(n) for n in input().split(" ")]
    maxlist = []
    for h in range(housecnt-1):
        maxlist.append(house[h+1]-house[h])
    maxlist.sort()
    for p in range(min(housecnt-1,elec-1)):
        maxlist.pop()
    print(sum(maxlist))
N, K = map(int, input().split())
S = list(input())

nums = []
now = 1
count = 0
for i in range(len(S)):
    if S[i] == str(now):
        count += 1
    else:
        nums.append(count)
        now = 1 - now
        count = 1
if count != 0:
    nums.append(count)
if len(nums) % 2 == 0:
    nums.append(0)  # ? 1を足すのでは？？

add = 2 * k + 1

sum = []
sum.append(0)
for i in range(len(nums) + 1):
    sum[i+1] = sum[i] + nums[i]

ans = 0

for i in range(len(nums),2):
    left = i
    right = min(i + add, len(nums))
    tmp = sum[right] - sum[left] 
    ans = max(tmp, ans)

print(ans)

### FIXED CODE ###

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

nums = []
now = 1
count = 0
for i in range(len(S)):
    if S[i] == str(now):
        count += 1
    else:
        nums.append(count)
        now = 1 - now
        count = 1
if count != 0:
    nums.append(count)
if len(nums) % 2 == 0:
    nums.append(0)

add = 2 * K + 1

sum = [0] * (len(nums)+1)

for i in range(len(nums)):
    sum[i+1] = sum[i] + nums[i]
ans = 0
for i in range(0, len(nums), 2):
    left = i
    right = min(i + add, len(nums))
    tmp = sum[right] - sum[left]
    ans = max(tmp, ans)

print(ans)
a,b,c=map(int,input(),split())
if a<b and b<c:
	print("Yes")
else:
	print("No")
	

### FIXED CODE ###

a,b,c=map(int,input().split())
if a<b and b<c:
	print("Yes")
else:
	print("No")
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
xy=[list(map(int,input().split())) for i in range(n)]

# dic={}
# for i in range(n):
#     x,y=xy[i]
#     dic[(x,y)]=1

cnt=0
sadic=defaultdict(int)
for i in range(n):
    x,y=xy[i]
    for j in range(n):
        if i==j:
            continue
        x2,y2=xy[j]
        p,q=x-x2,y-y2
        sadic[(p,q)]+=1
# print(sadic)
print(n-max(sadic.values()))

### FIXED CODE ###

import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
xy=[list(map(int,input().split())) for i in range(n)]

# dic={}
# for i in range(n):
#     x,y=xy[i]
#     dic[(x,y)]=1
if n==1:
    print(1)
    quit()
cnt=0
sadic=defaultdict(int)
for i in range(n):
    x,y=xy[i]
    for j in range(n):
        if i==j:
            continue
        x2,y2=xy[j]
        p,q=x-x2,y-y2
        sadic[(p,q)]+=1
# print(sadic)
print(n-max(sadic.values()))
n,a=map(int,input().split())
print("Yes" if n/500 <= a else "No")

### FIXED CODE ###

n=int(input())
a=int(input())
print("Yes" if (n%500) <= a else "No")