Harryxun/stf_run huggingface dataset:
A,B,H,M = map(int, input().split())

import math
print(math.pi)

degreeA = (H * 60 + M) / 2
degreeB = M * 6

if degreeA == degreeB:
    print(abs(A - B))
else:
    degreeAB = abs(degreeA - degreeB)
    if degreeAB == 180:
        print(A + B)
    elif degreeAB > 180:
        degreeAB = 360 - degreeAB
    C = A ** 2 + B ** 2 - 2 * A * B * math.cos(degreeAB * math.pi / 180)
    print(math.sqrt(C))
            

### FIXED CODE ###

A,B,H,M = map(float, input().split())

import math

degreeA = float((H * 60 + M) / 2)
degreeB = float(M * 6)

degreeAB = abs(degreeA - degreeB)

if degreeAB > 180:
    degreeAB = 360 - degreeAB
C = float(A ** 2 + B ** 2 - 2 * A * B * float(math.cos(float(degreeAB * math.pi / 180))))
print(math.sqrt(C))
a,b,x=map(int,input().split())
h=1
if a+b<=x<10*a+2*b:
    h=1
if 10*a+b*2<=x<100*a+3*b:
    h=2
if 100*a+b*3<=x<1000*a+4*b:
    h=3
if 1000*a+b*4<=x<10000*a+5*b:
    h=4
if 10000*a+b*5<=x<100000*a+6*b:
    h=5
if 100000*a+b*6<=x<1000000*a+7*b:
    h=6
if 1000000*a+b*7<=x<10000000*a+8*b:
    h=7
if 10000000*a+b*8<=x<100000000*a+9*b:
    h=8
if 100000000*a+b*9<=x<1000000000*a+10*b:
    h=9
if x>=1000000000*a+10*b:
    print(1000000000)
elif x<a+b:
    print(0)
else:
    d=0
    for i in range(10**(h-1),10**h):
        if i*a+b*h>x:
            print(d)
            break
        else:
            d=i
    else:
        print(d)

### FIXED CODE ###

s=input()
if s=="SAT":
    print(1)
if s=="SUN":
    print(7)
if s=="MON":
    print(6)
if s=="TUE":
    print(5)
if s=="WED":
    print(4)
if s=="THU":
    print(3)
if s=="FRI":
    print(2)
def half(xs):
  for x in xs:
    if x % 2 == 0:
      return xs
  for i in range(len(xs)):
    xs[i] /= 2
  return half(xs)


ls = [int(num) for num in input().split()]
print(half(ls))
    

### FIXED CODE ###

def half(xs):
    count = 0
    while True:
        for i in range(len(xs)):
            if xs[i] % 2 != 0 or xs[i] == 0:
                return count
            xs[i] /= 2
        else:
            count += 1
    return count


def main():
    _num = input()
    xs = [int(i) for i in input().split()]
    res = half(xs)
    print(res)


if __name__ == "__main__":
    main()
import sys
i = 0
x = []
for line in open('test.txt','r'):#sys.stdin:
    if i==0:
        x.append(int(line))
    else:
        s1 = 'SHCD'.index(line[0])
        s2 = int(line[2:])
        x.append((s1,s2))
    i = 1

r4 = range(4)
r13 = range(13)
lx = x.pop(0)
cards = [[0 for i in r13] for j in r4]
for j,i in x: cards[j][i-1] = 1

for j in r4:
    for i in r13:
        if cards[j][i]==0: print 'SHCD'[j],i+1
print

### FIXED CODE ###

r4 = range(4)
r13 = range(13)
cards = [[0 for i in r13] for j in r4]

n = input()
for i in range(n):
    s1, s2 = raw_input().split()
    s1 = 'SHCD'.index(s1)
    s2 = int(s2)-1
    cards[s1][s2] = 1

for j in r4:
    for i in r13:
        if cards[j][i]==0:
            print 'SHCD'[j],i+1
n,s = input().sprit()
n = int(n)
 
if n%2 == 0 :
	if s[:2/n-1] == s[2/n:]:
      print('Yes')
    else:
      print('No')
else:
	print('No')

### FIXED CODE ###

n= int(input())
s = input()

if n%2 ==0:
    if s[:int(n/2)] == s[int(n/2):]:
        print('Yes')
    else:
        print('No')
else:
    print('No')
if a+b==c:
 print("yes")
elif b+c==a:
 print("yes")
elif a+c==b:
 print("yes")
else:
 print("no")

### FIXED CODE ###

line=input()
line=line.split(" ")
 
a=int(line[0])
b=int(line[1])
c=int(line[2])
 
if a+b==c:
 print("Yes")
elif b+c==a:
 print("Yes")
elif c+a==b:
 print("Yes")
else:
 print("No")
# -*- coding: utf-8 -*-

def popMaxOishisa(sushis):
    t, d = sushis.pop()
    return t, d


def popMinOishisa_nonUniqueNeta(sel_sushis):
    t, d = min(sel_sushis["min"].items(), key=lambda i:i[1])
    sel_sushis[t].pop()
    if len(sel_sushis[t]) == 1:
        sel_sushis["min"][t] = 1e10
    else:
        sel_sushis["min"][t] = sel_sushis[t][-1]
    return t, d


def popMaxOishisa_uniqueNeta(sushis, netas):
    t, d = -1, -1
    while True:
        t, d = sushis.pop()
        if not t in netas:
            break
    return t, d


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

# Store data
sushis = []
neta_set = set()
sel_sushis = {"min":{}}
for i in range(n):
    t, d = map(int, input().split())
    sushis.append((t,d))
    neta_set.add(t)


# Formatting
sushis.sort(key=lambda i:i[1])
tMax = len(neta_set)

# Select sushi set as maximum oishisa point
sum_oishisa = 0
for i in range(k):
    t, d = popMaxOishisa(sushis)
    if not t in sel_sushis:
        sel_sushis[t] = [d]
        sel_sushis["min"][t] = 1e10
    else:
        sel_sushis[t].append(d)
        if sel_sushis["min"][t] > d:
            sel_sushis["min"][t] = d
    sum_oishisa += d

tMin = len(sel_sushis) - 1
max_score = tMin**2 + sum_oishisa

for nNeta in range(tMin+1, tMax + 1, 1):

    # Find sushi having minimum oishisa and being not unique for neta
    t1, d1 = popMinOishisa_nonUniqueNeta(sel_sushis)
    if t1 < 0:
        break
    sum_oishisa -= d1

    # Find sushi having maximum oishisa and unique for neta
    t2, d2 = popMaxOishisa_uniqueNeta(sushis, list(sel_sushis.keys()))
    sum_oishisa += d2

    if not t2 in sel_sushis:
        sel_sushis[t2] = [d2]
    else:
        sel_sushis[t2].append(d2)

    score = nNeta**2 + sum_oishisa
    if score > max_score:
        max_score = score

print(max_score)


### FIXED CODE ###

# -*- coding: utf-8 -*-


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

# Store data
sushis = []
neta_set = set()
for i in range(n):
    t, d = map(int, input().split())
    sushis.append((t,d))
    neta_set.add(t)


# Formatting
sushis.sort(key=lambda i:i[1])
tMax = len(neta_set)


# Select sushi set as maximum oishisa point
sel_sushis = []
neta_set = set()
sum_oishisa = 0
for i in range(k):
    t, d = sushis.pop()
    if t in neta_set:
        sel_sushis.append((t,d))
    else:
        neta_set.add(t)
    sum_oishisa += d

sel_sushis.sort(key=lambda i:i[1], reverse=True)
tMin = len(neta_set)
max_score = tMin**2 + sum_oishisa

for nNeta in range(tMin+1, tMax + 1, 1):

    # Find sushi having minimum oishisa and being not unique for neta
    if len(sel_sushis) == 0:
        break
    t1, d1 = sel_sushis.pop()
    sum_oishisa -= d1

    # Find sushi having maximum oishisa and unique for neta
    while True:
        t2, d2 = sushis.pop()
        if not t2 in neta_set:
            break

    sum_oishisa += d2
    neta_set.add(t2)

    score = nNeta**2 + sum_oishisa
    if score > max_score:
        max_score = score

print(max_score)
H,M = list(map(int,input().split()))
N = int(input())
a = list(map(int,input().split())


fill_space = []
mass = [[0 for i in range(M)] for j in range(H)]
count = 0


for i in range(N):
    for j in a[j]:
        fill_space.append(j+1)  

for k in range(H):
    for n in range(M):
        mass[k][n] = fill_space[count]
        count += 1

for l in range(H):
  if l%2 == 1:
      print(mass[l][::-1])
  else:
      print(mass[l])



### FIXED CODE ###

H,M = list(map(int,input().split()))
N = int(input())
a = list(map(int,input().split()))


space = []
mass = [[0 for i in range(M)] for j in range(H)]
count = 0


for i in range(N):
    for j in range(a[i]):
        space.append(i+1)  



for k in range(H):
    for n in range(M):
        mass[k][n] = str(space[count])
        count += 1

for l in range(H):
  if l%2 == 1:
      mass[l].reverse()


for x in range(H):
  print(" ".join(mass[x]))
i=input()
is=i.split(" ")
a=int(is[0])
b=int(is[1])
c=int(is[2])
if(a+b>c-1){
  print(c+b)
else{
  print(b+(a+b+1))


### FIXED CODE ###

i=input()
i_s=i.split(" ")
a=int(i_s[0])
b=int(i_s[1])
c=int(i_s[2])
if(a+b>c-1):
  print(c+b)
else:
  print(b+(a+b+1))
# -*- coding: utf-8 -*-

inlist = list(map(int, input().split()))
a = inlist[0] * 100
b = inlist[1] * 100
c = inlist[2]
d = inlist[3]
e = inlist[4]
f = inlist[5]

tupleList = []

for i in range((f//a) + 1):
    for j in range((f - a*i)//b + 1):
        for k in range((f - a*i - b*j)//c + 1):
            for l in range((f - a*i - b*j - c*k)//d + 1):
                if (c*k + d*l)*(100 + e) <= (a*i + b*j + c*k + d*l)*e:
                    tupleList.append([i, j, k, l])
tupleList.remove([0, 0, 0, 0])

def concentration(i, j, k, l):
    return (c*k + d*l)/(a*i + b*j + c*k + d*l)

max_con = concentration(tupleList[0][0], tupleList[0][1], tupleList[0][2], tupleList[0][3])
max_tuple = tupleList[0]

for i in range(len(tupleList) - 1):
    if max_con < concentration(tupleList[i+1][0], tupleList[i+1][1], tupleList[i+1][2], tupleList[i+1][3]):
        max_con = concentration(tupleList[i + 1][0], tupleList[i + 1][1], tupleList[i + 1][2], tupleList[i + 1][3])
        max_tuple = tupleList[i + 1]

print(str(a*max_tuple[0] + b*max_tuple[1] + c*max_tuple[2] + d*max_tuple[3]) \
      + " " + str(c*max_tuple[2] + d*max_tuple[3]))


### FIXED CODE ###

# -*- coding: utf-8 -*-

n = int(input())
a = int(input())

print(n*n - a)
N=int(input())
n=N[-1]
if n==3:
  ans='bon'
elif n==0,1,6,8:
  ans='hon'
else:
  ans='pon'
print(ans)

### FIXED CODE ###

N=input()
n=N[-1]
if n=='3':
  ans='bon'
elif n=='0' or n=='1' or n=='6' or n=='8':
  ans='pon'
else:
  ans='hon'
print(ans)
a, b, c = (int(i) for i in input().split())  
if b == "+":
  print(int(a) + int(c))
else:
  print(int(a) - int(c))


### FIXED CODE ###

a, b, c = (i for i in input().split())  
if b == "+":
  print(int(a) + int(c))
else:
  print(int(a) - int(c))
from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

N,K = map(int,input().split())
dp=[[0 for i in range(N)] for j in range(N)]

for i in range(N):
    dp[i][0] = 1
    for j in range(1,N):
        dp[i][j] = dp[i-1][j-1] + dp[i-1][j]

for i in range(1,K+1):
    print((dp[N-K+1][i]*dp[K-1][i-1])%MOD)


### FIXED CODE ###

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

import math

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

def combination_fuc(n,r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
#dp=[[0 for i in range(N)] for j in range(N)]
#for i in range(N):
#    dp[i][0] = 1
#    dp[i][i] = 1
#for i in range(2,N):
#    for j in range(1,i):
#        dp[i][j] = dp[i-1][j-1] + dp[i-1][j]
#for i in range(1,K+1):
#    tmp=dp[N-K+1][i]*dp[K-1][i-1]
#    if tmp > MOD:
#        print(tmp%MOD)
#    else:
#        print(tmp)

for i in range(1,K+1):
    if N-K+1 >= i:
        print((combination_fuc(N-K+1,i)*combination_fuc(K-1,i-1))%MOD)
    else:
        print(0)
N=int(input())
if N>50:
  N=50
S=list(input())
count=0
for i in range(N):
  if S[i]=="A":
    if S[i+1]=="B":
      if S[i+2]=="C":
        count+=1
print(count)
    

### FIXED CODE ###

N=int(input())
S=list(input())
count=0
for i in range(N-2):
  if S[i]=="A":
    if S[i+1]=="B":
      if S[i+2]=="C":
        count+=1
print(count)
n = int(input())
arr = [list(map(int,input().split())) for i in range(n)]
arr.sort()
outcount = 0
#リストの数を減らすと最後の２つがぶつかってた場合が判定できない
#時間がかかりすぎ1回okだったところは次はパスしたい
outnum = 0
def saiki():
    global outcount
    global outnum
    for i in range(outnum, len(arr)-2):
        if arr[i][0] + arr[i][1] > arr[i+1][0] - arr[i+1][1]:#アウトの条件
            outcount += 1
            outnum = i-1
            if [i+1][0] + arr[i+1][1] <= arr[i+2][0] - arr[i+2][1]:#1つあとのやつがぶつかってるか
                arr.pop(i)
            else:
                arr.pop(i + 1)
            return 'no'


while saiki() == 'no':
    saiki()

print(n - outcount)

### FIXED CODE ###

h = int(input())
w = int(input())
n = int(input())

big = max(h, w)
count = 0
kuro = 0
while kuro < n:
    kuro += big
    count += 1
print(count)
n = int(input())

li = list(map(int, input().split()))
cnt = 0
for i in range(n):
    li2 = li[i-2: i+1]
    if li2[1] == sorted(li2)[1]:
        cnt += 1

print(cnt)

### FIXED CODE ###

n = int(input())

li = list(map(int, input().split()))
cnt = 0
for i in range(1, n-1):
    li2 = li[i-1: i+2]
    if li2[1] == sorted(li2)[1]:
        cnt += 1
print(cnt)
## this submission is just for checking pypy3 performance
## the code is borrowed from http://code-festival-2016-quala.contest.atcoder.jp/submissions/899133


from sys import exit, setrecursionlimit
from functools import reduce
from itertools import *
from collections import defaultdict
 
def read():
  return int(input())
 
def reads():
  return [int(x) for x in input().split()]
 
setrecursionlimit(1000000)
 
(R, C) = reads()
N = read()
 
d = defaultdict(list)
V = set()
 
for _ in range(N):
  (r, c, a) = reads()
  (r, c) = (r-1, c-1)
  d["R", r].append((("C", c), a))
  d["C", c].append((("R", r), a))
  V.add(("R", r))
  V.add(("C", c))
 
def walk(v):
  V.discard(v)
  for (w, a) in d[v]:
    wcol = a - col[v]
    if w in col:
      if col[w] != wcol:
        print("No"); exit()
    else:
      col[w] = wcol
      walk(w)
 
while len(V) > 0:
  v = V.pop()
  col = dict()
  col[v] = 0
  walk(v)
  rcol = min(a for (v, a) in col.items() if v[0] == "R")
  ccol = min(a for (v, a) in col.items() if v[0] == "C")
  if rcol + ccol < 0:
    print("No"); exit()
 
print("Yes")


### FIXED CODE ###

s = input()
answer = s[:4] + ' ' + s[4:]
print(answer)
import math
NK = input().split()
N = int(NK[0])
K = int(NK[1])
if N==1 or K==1 or N ==0:
    print(0)
    exit()
else:
    print(math.gcd(N,K))

### FIXED CODE ###

NK = input().split()
N = int(NK[0])
K = int(NK[1])
if N%K<K-N%K:
    print(N%K)
else:
    print(K-N%K)
S = input()
print(S.replace("2017","2018")

### FIXED CODE ###

S = input()
print(S.replace("2017","2018"))
t,l=map(int,input().split())
li=[set() for i in range(t)]
for i in range(l):
  a,b= map(int,input().split())
  l[a-1].add(b)
  l[b-1].add(a)
for i in li:
  print(len(i))

### FIXED CODE ###

t,l=map(int,input().split())
li=[0 for i in range(t)]
for i in range(l):
  a,b= map(int,input().split())
  li[a-1]+=1
  li[b-1]+=1
print(*li,sep="\n")
A, B = map( int, input().split())
Board = [ ['#']*100 for _ in range(50)] + [['.']*100 for _ in range(50)]
i = 0
nowj = 0
for _ in range(A-1):
    Board[i][nowj] = '.'
    if nowj == 100:
        nowj = 0
        i += 2
    else:
        nowj += 2

i = 51
nowj = 0
for _ in range(B-1):
    Board[i][nowj] = '#'
    if nowj == 100:
        nowj == 0
        i += 2
    else:
        nowj  += 2

for i in range(100):
    print( ''.join(Board[i]))

### FIXED CODE ###

A, B = map( int, input().split())
Board = [ ['#']*100 for _ in range(50)] + [['.']*100 for _ in range(50)]
i = 0
nowj = 0
for _ in range(A-1):
    Board[i][nowj] = '.'
    if nowj == 98:
        nowj = 0
        i += 2
    else:
        nowj += 2
i = 51
nowj = 0
for _ in range(B-1):
    Board[i][nowj] = '#'
    if nowj == 98:
        nowj = 0
        i += 2
    else:
        nowj  += 2
print( '{} {}'.format(100, 100))
for i in range(100):
    print( ''.join(Board[i]))
from sys import stdin

def main():
    plus, minus = [], []
    readline = stdin.readline
    n = int(readline())
    for _ in range(n):
        s = readline().rstrip()
        if 2 * s.count('(') - len(s) > 0:
            plus.append(s)
        else:
            minus.append(s)
    plus.sort(key = lambda x: x.count(')'))
    minus.sort(key = lambda x: x.count('('), reverse = True)

    sum = 0
    for v in ''.join(plus + minus):
        sum = sum + (1 if v == '(' else -1)
        if sum < 0 : return print('No')
    if sum != 0:
        return print('No')

    return print('Yes')

if __name__ == '__main__':
    main()


### FIXED CODE ###

s = input()
t = input()

def main():
    if len(s) < 1 and len(s) > 10:
        print('No')
        return

    if (s.isalpha() == False or s.islower() == False):
        print('No')
        return

    if (t[-1].isalpha() == False or t[-1].islower() == False):
        print('No')
        return

    if len(t) == len(s) + 1 and t[:-1] == s:
        print('Yes')
    else:
        print('No')
    return

main()
import math

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

def lcm_(a, b): return (a * b) // math.gcd(a, b)

lcm = A[0]
for a in A[1:]:
    lcm = lcm_(lcm, a)

MOD = int(1e9) + 7
sum_ = 0
for a in A:
    sum_ += lcm // a
    sum_ %= MOD

print(sum_)

### FIXED CODE ###

from fractions import gcd
import sys

if True:
    N, *A = map(int, sys.stdin.read().split())
else:
    N = int(input())
    A = list(map(int, input().split()))

a = 1
for v in A:
    a = a * v // gcd(a, v)

MOD = int(1e9) + 7
sum_ = 0
for v in A:
    sum_ += a // v

print(sum_ % MOD)
N = int(input())
A = map(int, input().split())

XOR = 0
for a in A:
  XOR ^= a
for i in range(N):
  A[i] = A[i]^XOR
print(*A)
  

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
 
XOR = 0
for a in A:
  XOR ^= a
for i in range(N):
  A[i] = A[i]^XOR
print(*A)
>>> for N in range(1:1000):
>>> if N%10==2,4,5,7,9:
    print("hon")
>>> elif N%10==0,1,6,8:
    print("pon")
>>> else:
    print("bon")

### FIXED CODE ###

a = int(input())
a %= 10

if a==0 or a==1 or a==6 or a==8:
  print("pon")
elif a==3:
  print("bon")
else:
  print("hon")
N = int(input())
a = sorted(list(map(int, input().split()), reverse=True))

ans = 0

for i in range(n-1):
    ans += a[(i+1)//2]
print(ans)


### FIXED CODE ###

N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)

ans = 0

for i in range(N-1):
    ans += a[(i+1)//2]
print(ans)
def check_prime(num):
  for i in range(2,num):
    if (x % i == 0):
      return False
      break
  else: 
    return True
 
if _name_ == "_main_":
  x = int(input())
  flag = True
  
  while flag: 
    if (check_prime(x)):
      print(x)
      flag = False
    else: 
      x = x + 1

### FIXED CODE ###

def check_prime(num):
  for i in range(2,num):
    if (x % i == 0):
      return False
      break
  else: 
    return True
 
if __name__ == "__main__":
  x = int(input())
  flag = True
  while flag: 
    if (check_prime(x)):
      print(x)
      flag = False
    else: 
      x = x + 1
N = int(input())
H = list(map(int, input().split()))

memo = {0:0,1:abs(H[1]-H[0])}
def dp(n):
    if n in memo:
        return memo[n]

    memo[n] = min(dp(n-2) + abs(H[n-2]-H[n]),dp(n-1) + abs(H[n-1]-H[n]))

    return memo[n]

print(dp(N-1))

### FIXED CODE ###

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

dp = [0]*N
for i in range(N):
  if i == 0:
    dp[i] = 0
  elif i == 1:
    dp[i] = abs(H[i]-H[i-1])
  else:
    dp[i] = min((dp[i-1]+abs(H[i]-H[i-1])),dp[i-2]+abs(H[i]-H[i-2]))
print(dp[-1])
for i in range(6):
    a.append(int(input()))

if a[4] - a[0] <= a[5]:
    print('Yay!')
else:
    print(':(')

### FIXED CODE ###

a = []

for i in range(6):
    a.append(int(input()))

if a[4] - a[0] <= a[5]:
    print('Yay!')
else:
    print(':(')
k, t = list(map(int, input().split()))
nums = list(map(int, input().split()))

m = max(nums)
rest = k - m
if max - rest - 1 > 0:
    print(max - rest - 1)
else:
    print(0)


### FIXED CODE ###

k, t = list(map(int, input().split()))
nums = list(map(int, input().split()))

m = max(nums)
rest = k - m
if m - rest - 1 > 0:
    print(m - rest - 1)
else:
    print(0)
import math
A, B = map(int, input().split())


def gcd(A, B):
    return (A*B) // math.gcd(A, B)


print(gcd(A, B))


### FIXED CODE ###

import fractions
A, B = map(int, input().split())


def abc(A, B):
    return (A*B) // fractions.gcd(A, B)


print(abc(A, B))
def even(d):
    return d // 2

def odd(A, B, N):
    if abs(A-1) > abs(B-(N)):
        dist2edge = abs(B-(N))
        A += dist2edge
        B += dist2edge 
        assert B == N

        return even(abs((A+1)- B)) + 1 + dist2edge

    else:
        dist2edge = abs(A)
        A -= dist2edge
        B -= dist2edge
        assert A == 1
    
        return even(abs(A- (B-1))) + 1 + dist2edge


def main():
    N, A, B = map(int, input().split())
    diff = abs(A-B)

    if diff % 2 == 0:
        print(even(diff))
    else:
        print(odd(A, B, N))

if __name__ == "__main__":
    main()


### FIXED CODE ###

def even(d):
    return d // 2

def odd(A, B, N):
    if abs(A-1) > abs(B-N):
        dist2edge = abs(B-N)
        A += dist2edge
        B += dist2edge 

        return even(abs((A+1)- B)) + 1 + dist2edge

    else:
        dist2edge = abs(A - 1)
        A -= dist2edge
        B -= dist2edge
    
        return even(abs(A- (B-1))) + 1 + dist2edge


def main():
    N, A, B = map(int, input().split())
    diff = abs(A-B)

    if diff % 2 == 0:
        print(even(diff))
    else:
        print(odd(A, B, N))

if __name__ == "__main__":
    main()
a, b, x = map(int,input().split())
s = x/a
import math
if (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  l = 2*(b - s/a)
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))

### FIXED CODE ###

a, b, x = map(int,input().split())
s = x/a
import math
if s == a * b:
  print(0)
elif (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  l = 2*(b - s/a)
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))
sen=[A,B,C]
x=max(sen)
y=min(sen)
if x==7 and y==5 and sum(sen)-x-y==5:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

# -*- coding: utf-8 -*-

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

sen = [A, B, C]
x = max(sen)
y = min(sen)
if x == 7 and y == 5 and sum(sen) - x - y == 5:
    print("YES")
else:
    print("NO")
a = input()
b = input()
print a*b, 2*(a+b)

### FIXED CODE ###

(a,b) = map(int,raw_input().split())
print a*b,2*(a+b)
n=int(input())
l = [0]*100000
for i in range(1,n+1):
    num=int(input())
    l[num]=i
for i in range(1,n+1):
    print(l[i])

### FIXED CODE ###

n = int(input())

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

new_list = []

for i in range(1, n+1):
    new_list.append([enter[i-1], i])

new_list.sort()

for i in range(n):
    print(new_list[i][1], end = " ")
N,X=map(int,input().split())
inputcities=list(map(int, input().split()))
cities=[abs(inputcities[i]-X) for i in range(N)]
count=0
minimum=min(cities)
for j in range(minimum+1)[::-1]:
  for i in range(N):
    if cities[i]%j==0:
      count+=1
    else:
      count=0
      break
    if count==N:
      print(j)
      flag=1
      break
  if flag==1:
    break


### FIXED CODE ###

def gcd(a,b):
    if a < b:
        a,b = b,a
    if a % b == 0:
        return b
    else:
        return gcd(b,(a % b))
 
N,X=map(int,input().split())
inputcities=list(map(int, input().split()))
cities=[abs(inputcities[i]-X) for i in range(N)]
cities.sort()
D=cities[0]
for i in range(N):
  D=gcd(D,cities[i])
print(D)
N,K = map(int, input().split())
S = str(input())

## 連続するものをlistとして保持する
import re

candidates = []
candidates_idx = []
for j in range(N-1):
  if S[j] != S[j+1]:
    candidates_idx.append(j)
for u in range(len(candidates_idx)):
  if u == 0:
    candidates.append(S[:candidates_idx[u]+1])
  else:
    candidates.append(S[candidates_idx[u-1]+1:candidates_idx[u]+1])
candidates.append(S[candidates_idx[u]+1:])

#print(candidates)
## いい具合にnumpyで操作
import numpy as np
count_0 = np.zeros((len(candidates)))
count_1 = np.zeros((len(candidates)))

for i,candidate in enumerate(candidates):
  if int(candidate[0]) == 0:
    count_0[i] += len(candidate)
  else:
    count_1[i] += len(candidate)
    
## 最小の試行回数
min_Try = len(np.where(count_0 != 0)[0])

change_ = np.where(count_0 != 0)[0]
## 最小の試行回数以下の時どうするかが厳しいな...
## 連続しないので、とりあえず大きい順に入れていけばオッケー
## 個数分だけ全部足して、indexで見たときに一番大きいやつが正解！！
if min_Try <= K :
  print(N)
else:
  count_ = count_0 + count_1
  #print(count_)
  change_list = []
  for k in range(min_Try-K+1):
    c__ = change_[k:k+K]
    s = max(0,c__[0]-1)
    e = min(len(candidates)-1,c__[-1]+1)
    #print(count_[s:e+1])
    change_list.append(np.sum(count_[s:e+1]))
  print(int(max(change_list)))

### FIXED CODE ###

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

S = S + 'E'   # 終端処理
ans = -1    # 答えの初期値（十分に小さい値）

# 立った人の連続の数
if (S[0] == '0'):
    stand = 1
else:
    stand = 0

L = 0
R = 0

# 尺取り法
while (R < N):
    # 右端を進めることが可能（立った人の連続の数がK以下）なら、右端を進める
    if (stand <= K):
        # 立った人の連続の数が増えるなら1足す
        if (S[R] == '1' and S[R + 1] == '0'):
            stand += 1
        # 答えの更新
        ans = max(ans, R - L + 1)
        R += 1
    # 進められない場合、左端と右端が同じなら両者を進める
    # 左端が右端を追い越さないための処理
    elif (L == R):
        L += 1
        R += 1
    # それ以外は左端のみを進める
    else:
        # 立った人の連続の数が減るなら1減らす
        if (S[L] == '0' and S[L + 1] == '1'):
            stand -= 1
        L += 1
        # 左端のみを進めた場合は答えを更新し得ない

print(ans)