Harryxun/stf_run huggingface dataset:
s=int(input())
l=[]
while s>0:
  l.append(s%100)
  s//=100
print("AMBIGUOUS" if 1<=l[0]<=12 and 1<=l[1]<=12 else "YYMM" if 1<=l[0]<=12 else "MMYY" if 1<=l[1]<=12 else "NA")

### FIXED CODE ###

s=input()
a=int(s[:2])
b=int(s[2:])
print("AMBIGUOUS" if 1<=a<=12 and 1<=b<=12 else "YYMM" if 1<=b<=12 else "MMYY" if 1<=a<=12 else "NA")
def op_print(data,a,b):
    for i in range(a,b):
        print(data[i])
def op_reverse(data,a,b):
    return data[:a] + data[::-1][-b:-a] + data[:b]
def op_replace(data,a,b,q):
    return data.replace(data[a:b],q) 

data = input()
q = int(input())
for _ in range(q):
    op = list(map(str,input().split()))
    if(op[0] == "print"):
        op_print(data,int(op[1]),int(op[2]))
    elif(op[0] == "reverse"):
        data = op_reverse(data,int(op[1]),int(op[2]))
    elif(op[0] == "replace"):
        data = op_replace(data,int(op[1]),int(op[2]),op[3])


### FIXED CODE ###

s=input()
for _ in range(int(input())):
    o=input().split()
    a,b=map(int,o[1:3]);b+=1
    c=o[0][2]
    if c=='p':s=s[:a]+o[3]+s[b:]
    elif c=='i':print(s[a:b])
    elif c=='v':s=s[:a]+s[a:b][::-1]+s[b:]
arr = map(int, input().split())
print(arr[2], arr[0], arr[1])

### FIXED CODE ###

arr = list(map(int, input().split()))
print(arr[2], arr[0], arr[1])
from collections import defaultdict

M = 998244353
B = pow(10, 18, M)
N = int(input())

def ext_euc(a, b):
  x1, y1, z1 = 1, 0, a
  x2, y2, z2 = 0, 1, b
  while z1 != 1:
    d, m = divmod(z2,z1)
    x1, x2 = x2-d*x1, x1
    y1, y2 = y2-d*y1, y1
    z1, z2 = m, z1
  return x1, y1

def inv_mod(a, b, m):
  x, y = ext_euc(a, m)
  return (x * b % m)

def mex(s):
  for i in range(N+1):
    if i not in s:
      return i

def calc_grundy(e):
  g = {}
  sum_g = defaultdict(int)
  sum_g[0] = inv_mod(B-1, pow(B, N+1, M)-B, M)
  for i in range(N, 0, -1):
    if i not in e:
      continue
    m = mex({g.get(j, 0) for j in e[i]})
    if m:
      g[i] = m
  x = 1
  for i in range(1, N+1):
    x = (x * B) % M
    if g[i]:
      sum_g[g[i]] += x
      sum_g[0] -= x
  return sum_g

def read_edge():
  M = int(input())
  e = defaultdict(set)
  for i in range(M):
    a, b = sorted(map(int, input().split()))
    e[a].add(b)
  return e

def solve(N, edge):
  sum_g = list(map(calc_grundy, edge))
  ret = 0
  for gx, sx in sum_g[0].items():
    for gy, sy in sum_g[1].items():
      gz = gx^gy
      sz = sum_g[2][gz]
      if sz:
        ret += (sx*sy*sz) % M
  return ret%M


edge = [read_edge() for i in range(3)]

print(solve(N, edge))

### FIXED CODE ###

from collections import defaultdict

M = 998244353
B = 10**18 % M

def mex(s):
  for i in range(max(s)+2):
    if i not in s:
      return i

def ext_euc(a, b):
  x1, y1, z1 = 1, 0, a
  x2, y2, z2 = 0, 1, b
  while z1 != 1:
    d, m = divmod(z2,z1)
    x1, x2 = x2-d*x1, x1
    y1, y2 = y2-d*y1, y1
    z1, z2 = m, z1
  return x1, y1

def inv_mod(a, b, m):
  x, y = ext_euc(a, m)
  return (x * b % m)

def calc_grundy(e):
  g = {}
  sum_g = defaultdict(int)
  sum_g[0] = inv_mod(B-1, pow(B, N+1, M)-B, M)
  for i in sorted(e.keys(), reverse=True):
    m = mex({g.get(j,0) for j in e[i]})
    if m:
      g[i] = m
      x = pow(B, i, M)
      sum_g[m] += x
      sum_g[0] -= x
  return sum_g

def get_edge():
  M = int(input())
  e = defaultdict(set)
  for i in range(M):
    a, b = sorted(map(int, input().split()))
    e[a].add(b)
  return e

def solve(N, edge):
  sum_g = list(map(calc_grundy, edge))
  ret = 0
  for gx, x in sum_g[0].items():
    for gy, y in sum_g[1].items():
      gz = gx^gy
      z = sum_g[2][gz]
      ret = (ret + x*y*z)%M
  return ret

N = int(input())
edge = [get_edge() for i in range(3)]

print(solve(N, edge))
n,m = map(int,raw_input().split())
ans = 0
if(n >= 2):
    ans += n*(n-1)//2
    
if(m >= 2):
    ans += m*(m-1)//2
print(ans)


### FIXED CODE ###

n,m = map(int,input().split())
ans = 0
if(n >= 2):
    ans += n*(n-1)//2
    
if(m >= 2):
    ans += m*(m-1)//2
print(ans)
a , b , h = [int(input()) for _ in range(3)]
printint(((a + b) * h / 2))

### FIXED CODE ###

a , b , h = [int(input()) for _ in range(3)]
print(int((a + b) * h / 2))
def slove(n, m):
    tmp = n if n < m // 2 else m // 2
    tmp2 = (m - tmp * 2) // 4
    return tmp + tmp2
    
if __name__ == "__main__":
    n, m = [i for i in input().split()]
    print(slove(n, m))

### FIXED CODE ###

def slove(n, m):
    tmp = n if n < m // 2 else m // 2
    tmp2 = (m - tmp * 2) // 4
    return tmp + tmp2
    
if __name__ == "__main__":
    n, m = [int(i) for i in input().split()]
    print(slove(n, m))
'''Yoshichiの日記
あみだくじ。
0本目からスタートし、W本の長さH + 1までにを任意の線を引いた時
K本目にたどり着くパターンは何パターンあるか答えよ。
現在の位置状態での線の引き方を全列挙し、DP(メモ化再帰)を用いて答える。
x → 現在の位置
y → 現在の進み具合
for分のi → 現在の位置にいる時の線の配置状態(1が隣接へつながっているとき)
for分のj → NGパターンの列挙(隣へ繋がっているかつ、
                   次の隣へも線が引かれている状態)
'''
h, w, k = map(int, input().split())
memo = defaultdict(lambda:defaultdict(int))
def dfs(x, y):
    if y == h:
        if x == k - 1:
            return 1
        else:
            return 0
    if y in memo[x]:
        return memo[x][y]

    ans = 0
    for i in range(1 << w - 1):
        flg = True
        for j in range(w - 2):
            if i & (1 << j) and i & (1 << j + 1):
                flg = False
                break
        if flg:
            nx = x
            if x > 0 and i & (1 << x - 1):
                nx = x - 1
            elif i & (1 << x):
                nx = x + 1
            ans += dfs(nx, y + 1)
            ans %= 1000000000 + 7
    memo[x][y] = ans
    return ans
print(dfs(0, 0))

### FIXED CODE ###

'''3/18 AtCoder（漸化式dp）
一番左の棒からスタートして、K番目の棒に到達するようなあみだくじは
何通り作れますかという趣旨の問題
まず、この問題を解くうえで一番重要なのは、
「ある高さh、棒jに至る経路の総数を求める漸化式が立てられる」ということ
高さh、棒jに至る経路の総数をdp[h][j]とすれば、
高さh-1からこの位置に至ることができるのは、
棒j-1,j,j+1のいずれかしかない
さらに、そこに至る経路数というのは結局
「ほかの棒にどんな風に架け橋（横棒）がかかっているか」の場合の数なので、
それをdp[h-1][j-1],dp[h-1][j],dp[h-1][j+1]にかけていく必要がある
例えば、dp[h-1][j]を見てみる　これは、同じ棒から下ってくることを
意味しているが、換言すれば「高さi-1とiには、棒jから伸びる横棒はない」
ということである
つまり、この高さにおける横棒の架かり方というのは
「棒1~j-1までの架かり方」と「棒j+1~棒Wまでの架かり方」の
二パターンしかないということになる
ある高さにおける横棒のかかり方も漸化式で求められる　
高さhにおける(横一列にかけ橋が並んでいる状況を考える）、
n本の棒の間にかかる橋の場合の数の総数をf(n)と置くと、
f(n) = f(n-1)+f(n-2)と書くことができる
これは、f(n)が
①n本目とn-1本目の棒の間に橋が架かっていない→場合の数はf(n-2)と同じ
②n本目とn-1本目の棒の間に橋が架かっている→場合の数はf(n-1)と同じ
の二パターンの合計だからである
だから、dp[h-1][j]に掛ける数はいくつかということを考えたら、
j-1本の棒の間にかかる橋の場合の数f(j-1)と、
W-j本の棒の間にかかる橋の場合の数f(W-j)本ということになる　
これと同様に、残り二本に対してもいくつかければよいかを考えて、
dp[h][j]]に対する漸化式を立てればよい
'''
H,W,K = map(int,input().split())
dp = []
for i in range(H+1): #高さ0の分を余分に持っておく
  L = [0]*W
  dp.append(L)
fb = [1,1] #フィボナッチ（f(n)=f(n-1)+f(n-2)）
for i in range(W-2):
  fb.append(fb[i]+fb[i+1])
dp[0][0] = 1 #左端の棒の高さ0は初期位置なので1に
if W != 1: #棒が一本以上あるときは
  for i in range(1,H+1):
    for j in range(W): #棒が左端、右端、それ以外で場合分け
      if 1 <= j <= W-2:
        dp[i][j] = dp[i-1][j-1]*fb[j-1]*fb[W-j-1]+dp[i-1][j]*fb[j]*fb[W-j-1]+dp[i-1][j+1]*fb[j]*fb[W-j-2]
      elif j == 0:
        dp[i][j] = dp[i-1][j]*fb[W-1]+dp[i-1][j+1]*fb[W-2]
      else:
        dp[i][j] = dp[i-1][j]*fb[W-1]+dp[i-1][j-1]*fb[W-2]
else:
  dp[H][0] = 1
print(dp[H][K-1]%(10**9+7)) #高さH（一番下）、K-1番目の棒を調べる
import math


def solve():
    A, B, N = map(float, input().split())

    ans = 0
    div_ab = A/B
    div_1b = 1/B
    init_1 = (max(1, int(N)-100000)*A)/B
    init_2 = max(1, int(N)-100000)/B
    start = max(1, int(N)-100000)

    for i in range(max(1, int(N)-100000), int(N) + 1):
        ans = max(math.floor(init_1+div_ab*(i-start)) - A*math.floor(init_2+div_1b*(i-start)),ans)
    start = max(B-1000,1)
    init_1 = (max(1, int(B-100000)) * A) / B
    init_2 = max(1, int(B-100000)) / B
    for i in range(max(int(B-100000),1), max(N,int(B)+1)):
        ans = max(math.floor(init_1 + div_ab * (i - start)) - A * math.floor(init_2 + div_1b * (i - start)), ans)

    print(int(ans))


if __name__ == '__main__':
    solve()


### FIXED CODE ###

def solve():
    A,B,N = map(int, input().split())
    if N < B-1:
        print((A*N)//B - A * (N//B))
    else:
        print(((A*(B-1))//B) - A* ((B-1)//B))


if __name__ == "__main__":
    solve()
N,M = map(int,input().split())
L = []
R = []
LR = [list(map(int,input().split())) for _ in range(M)]
for i in range(M):
    L.append(LR[i][0])
countL = 0
countL = max(L)
for j in range(M):
    R.append(LR[j][1])
countR = 0
countR = min(R)
if countR - countL + 1 <= 0:
    print("0")
else:
    print(countR-countL+1)
    


    



### FIXED CODE ###

A,B = map(int,input().split())
if A >= 13:
    print(B)
elif 6 <= A <= 12:
    print(int(B/2))
else:
    print("0")
import math

def lcm(x,y):
    return (x*y)//math.gcd(x,y)

def div_num(a,x,y):
    return a//x + a//y - a//lcm(x,y)

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

ans = (b-a+1) - ( div_num(b,c,d) - div_num((a-1),c,d) )

print(ans)

### FIXED CODE ###

def gcd(x,y):
    while y != 0:
        x,y = y, x%y
    return x

def lcm(x,y):
    return (x*y) // gcd(x,y)

def div_num(a,x,y):
    return a//x + a//y - a//lcm(x,y)

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

ans = (b-a+1) - ( div_num(b,c,d) - div_num((a-1),c,d) )

print(ans)
N, K  = map(int, input().split())
As = sorted(list(map(int, input().split())))
Fs = sorted(list(map(int, input().split())),reverse=True)
Xs = sorted([(a*f,i) for i,(a,f) in enumerate(zip(As,Fs))],reverse=True)
# Xs =[a*f for a,f in zip(As,Fs)]
# print(Xs)
# print(As)
# print(Fs)
import heapq
q = []
INF = 10**6
heapq.heapify(q)
for i,(a,f) in enumerate(zip(As,Fs)):
    num = -(a*f*INF+i)
    heapq.heappush(q,num)
if K >= sum(As):
    print(0)
    exit()
for k in range(K):
    num = heapq.heappop(q)
    i = (-num)%INF
    n = (-num)//INF
    print(i,n,As[i],Fs[i])
    As[i] -= 1
    upd = -(As[i]*Fs[i]*INF+i)
    heapq.heappush(q,upd)
num = heapq.heappop(q)
ans = (-num)//INF
print(ans)


x_min = min(Xs)
ns = [max(0,A-x_min//F) for A,F in zip(As,Fs)]
print(ns)


### FIXED CODE ###

N, K  = map(int, input().split())
As = sorted(list(map(int, input().split())))
Fs = sorted(list(map(int, input().split())),reverse=True)
Xs = [a*f for a,f in zip(As,Fs)]
X_M = max(Xs)

def f(x):
    K_tmp = sum([max(0,a-x//f) for a,f in zip(As,Fs)])
    return K_tmp <= K

def  binarySearch(l,r,target):
    while r - l > 1:
        mid = (l+r)//2
        """計算を入れる"""
        # print(mid, guess)
        if f(mid):
            r = mid
        else:
            l = mid
    return r

print(binarySearch(-1,X_M,K))
k=int(input())
s=input()
if len(s)<=k:
  print(k)
else:
  print(s[:k]&"...")

### FIXED CODE ###

k=int(input())
s=input()
if len(s)<=k:
  print(s)
else:
  print(s[:k]+"...")
from collections import Counter
n=int(input())
A=list(map(int,input().split()))
A=Counter(A)
S=[]
for i,j in A.items():
  if j>=2:
    S.append(i)
S=list(set(S))
S.sort()
if len(S)>=2:
  ans=S[-1]*S[-2]
else:
  print(0)
  exit()

Q=[]
for i,j in A.items():
  if j>=4:
    Q.append(i)
print(max(ans, (max(Q))**2))


### FIXED CODE ###

from collections import Counter
n=int(input())
A=list(map(int,input().split()))
A=Counter(A)

S=[]
for i,j in A.items():
  if j>=2:
    S.append(i)
S=list(set(S))
S.sort()
if len(S)>=2:
  ans=S[-1]*S[-2]
else:
  print(0)
  exit()

Q=[]

for i,j in A.items():
  if j>=4:
    Q.append(i)
if Q==[]:
  print(ans)
  exit()
print(max(ans, (max(Q))**2))
s = input()
t = input()
cnt = 0
for i in range(s):
    if s[i] == t[i]:
        cnt = cnt+1

print(cnt)

### FIXED CODE ###

S = input()
T = input()
c = 0
for i in range(3):
  if (S[i] == T[i]):
    c = c + 1
print(c)
import sys
input = sys.stdin.readline

n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [0]*m
c = [0]*m
sortsecond = lambda val: val[1]

x = [list(map(int, input().split())) for _ in range(m)]

x.sort(key=sortsecond)

a.sort()

i = 0
for j in range(m):
    times = x[-(j+1)][0]
    number = x[-(j+1)][1]
    while times > 0 :

        temp = a[i]
        if temp < number:
            a[i] = number
        else:
            print(sum(a))
            exit()
        times -= 1
        i += 1
print(sum(a))

### FIXED CODE ###

import sys
input = sys.stdin.readline

n, m = map(int, input().split())
a = list(map(int, input().split()))
b = [0]*m
c = [0]*m
sortsecond = lambda val: val[1]

x = [list(map(int, input().split())) for _ in range(m)]

x.sort(key=sortsecond)

a.sort()


i = 0
for j in range(m):
    times = x[-(j+1)][0]
    number = x[-(j+1)][1]
    while times > 0 :

        try:
            temp = a[i]
        except IndexError:
            print(sum(a))
            exit()
        
        if temp < number:
            a[i] = number
        else:
            print(sum(a))
            exit()
        times -= 1
        i += 1
print(sum(a))
n = int(input())
a = list(map(int, input().split()))
a.sort()
for i in range(n-1):
  if a[i]==a[i+1]:
    print("NO")
    break
print("YES")


### FIXED CODE ###

s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s :
    print(a-1, b)
else :
    print(a, b-1)
N,M = map(int,input().split(' '))
A = list(map(int,input().split(' ')))
B =[]
C =[]

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

A.sort()
l = sorted(l,key = lambda x:x[1])

ttl = 0
m_score = 0
flag =False
for i in l[::-1]:
    p = i[0]
    k = i[1]
    ttl+=p
    t = ttl-1
    if t>=N:
        for n,j in enumerate(i[t-p+1:]):
            if j<k:
                m_score+=p
                break
        m_score += sum(A[t-p+1+n:])
        flag = True
        break
    if A[t]<k:
        m_score += p*k
        continue
    else:
        for n,j in enumerate(A[t-p+1:t+1]):
            if j>k:
                flag = True
                break
        if flag:
            m_score += k*n+sum(A[t-p+1+n:])
            break
if not flag:
    if ttl<N:
        m_score += sum(A[ttl:])
print(m_score)


### FIXED CODE ###

N,M = map(int,input().split(' '))
A = list(map(int,input().split(' ')))
l = [list(map(int,input().split())) for i in range(M)]

A.sort()
l = sorted(l,key = lambda x:x[1])

ind =0
for b,c in l[::-1]:
    mx = min(N,ind+b)
    for i in range(ind,mx):
        if c>A[i]:
            A[i] = c
    if mx==N:
        break
    ind += b
print(sum(A))
h,w = list(map(int, input().split()))
xs = []
for _ in range(h):
    xs.append(list(map(int, input().split())))

x = np.vstack(xs)
x = x%2
x

def move(x,m):
    x[m[0],m[1]] -= 1
    x[m[2],m[3]] += 1
    x = x%2
    return x

ms = []
k = 0

while True:
    temp = np.where(x[k] == 1)[0]
    if len(temp) == 0 :
        k += 1
    else:
        i = temp[0]
        if i < w - 1:
            m = [k,i,k,i+1]
            ms.append(m)
            x = move(x,m)
        
        else:
            k += 1
    if k >= h:
        break

k = 0

while True:
    temp = np.where(x[:,k] == 1)[0]
    if len(temp) == 0 :
        k += 1
    else:
        i = temp[0]
        if i < h - 1:
            m = [i,k,i+1,k]
            ms.append(m)
            x = move(x,m)        
        else:
            k += 1
    if k >= w:
        break

import sys

print(len(ms))
for a in ms:
    for aa in a:
        sys.stdout.write('{} '.format(aa + 1))
    sys.stdout.write('\n')
        




### FIXED CODE ###

import numpy as np
h,w = list(map(int, input().split()))
xs = []
for _ in range(h):
    xs.append(list(map(int, input().split())))
#     xs.append(np.random.binomial(10,0.5,w))

def move_yoko(k,x):
    temp = np.where(x[k] == 1)[0]
    ms = []
    if len(temp)%2 == 0:
        for j in range(int(len(temp)/2)):
            a = temp[2*j]
            b = temp[2*j+1]
            for i in range(b - a):
                ms.append([k,a+i,k,a+1+i])
        x[k] = 0
    else:
        for j in range(int((len(temp)-1)/2)):
            a = temp[2*j]
            b = temp[2*j+1]
            for i in range(b - a):
                ms.append([k,a+i,k,a+1+i])
        a = temp[-1]
        b = w - 1
        for i in range(b - a):
            ms.append([k,a+i,k,a+1+i])
        x[k] = 0
        x[k,-1] = 1
    return ms,x

def move_tate(k,x):
    temp = np.where(x[:,k] == 1)[0]
    ms = []
    if len(temp)%2 == 0:
        for j in range(int(len(temp)/2)):
            a = temp[2*j]
            b = temp[2*j+1]
            for i in range(b - a):
#                 ms.append([k,a+i,k,a+1+i])
                ms.append([a+i,k,a+1+i,k])
        x[:,k] = 0
    else:
        for j in range(int((len(temp)-1)/2)):
            a = temp[2*j]
            b = temp[2*j+1]
            for i in range(b - a):
                ms.append([a+i,k,a+1+i,k])
                
        a = temp[-1]
        b = h - 1
        for i in range(b - a):
            ms.append([a+i,k,a+1+i,k])
        x[:,k] = 0
        x[-1,k] = 1
    return ms,x

x = np.vstack(xs)
x = x%2

mss = []
for k in range(h):
    ms, x = move_yoko(k,x)
    mss += ms
ms, x = move_tate(w-1,x)
mss += ms
ms = mss

import sys
print(len(ms))
for a in ms:
    for k in range(len(a)):
        if k == len(a)-1:
            sys.stdout.write('{}'.format(a[k] + 1))
        else:
            sys.stdout.write('{} '.format(a[k] + 1))
    sys.stdout.write('\n')
s=input()
t=input()
ls=len(s)
lt=len(t)
dp=[[0]*(lt+1) for i in range(ls+1)]
for i in range(ls):
  for j in range(lt):
    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])
                                                                                                    
ans=""
def rec(i,j):
  if i==0 or j==0:
    return 
  global ans
  if s[i-1]==t[j-1]:
    ans+=s[i-1]
    rec(i-1,j-1)
  elif dp[i-1][j]>=dp[i][j-1]:
    rec(i-1,j)
  else:
    rec(i,j-1)
rec(ls,lt)
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
s=input()
t=input()
ls=len(s)
lt=len(t)
dp=[[0]*(lt+1) for i in range(ls+1)]
for i in range(ls):
  for j in range(lt):
    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])
                                                                                                    
ans=""
def rec(i,j):
  if i==0 or j==0:
    return 
  global ans
  if s[i-1]==t[j-1]:
    ans+=s[i-1]
    rec(i-1,j-1)
  elif dp[i-1][j]>=dp[i][j-1]:
    rec(i-1,j)
  else:
    rec(i,j-1)
rec(ls,lt)
print(ans[::-1])
N, K = map(int, input().split())
S = list(input())
l = len(S)
X = []
cnt0 = 0
cnt1 = 0
for i in S:
    if i == '0':
        if cnt1 != 0:
            X.append(cnt1)
            cnt1 = 0
            cnt0 += 1
        else:
            cnt0 += 1
    else:
        if cnt0 != 0:
            X.append(cnt0)
            cnt0 = 0
            cnt1 += 1
        else:
            cnt1 += 1
if cnt1 != 0:
    X.append(cnt1)
elif cnt0 != 0:
    X.append(cnt0)
ans = []
if S[0] == '1': #Xの奇数は1
    sum0 = sum(X[0:2*K+1])
    ans.append(sum0)
    i = 1
    while 2*K+2*i-1 < len(X):
        ans.append(ans[i-1] + X[2*K+2*i-1] + X[2*K+2*i] - X[i] - X[i-1])
        i += 1
else:
    sum0 = sum(X[0:2*K])
    ans.append(sum0)
    i = 1
    while 2*K+2*i < len(X):
        if i == 1:
            ans.append(ans[i-1] + X[2*K+2*i+1] + X[2*K+2*i] - X[i-1])
            i += 1
        else:
            ans.append(ans[i-1] + X[2*K+2*i+1] + X[2*K+2*i] + X[i] - X[i] - X[i-1])
            i += 1
print(max(ans))

### FIXED CODE ###

N, K = map(int, input().split())
S = list(input())
X = []
cnt = 1
for i in range(1, N):
    if S[i] != S[i-1]:
        X.append(cnt)
        cnt = 0
    cnt += 1
    if i == N-1:
        X.append(cnt)
l = len(X)

if S[0] == '0' and (l+1)//2 <= K:
    print(N)
    exit()
if S[0] ==  '1' and l//2 <= K:
    print(N)
    exit()

ans = 0
result = 0
if S[0] == '0':
    for j in range(2*K):
        result += X[j]
    ans = result
    for j in range(2*K, l):
        if j == 2*K:
            result -= X[0]
        elif j%2 == 0:
            result = result - X[j-2*K] - X[j-2*K-1]
        result += X[j]
        ans = max(ans,result)
else:
    for j in range(2*K+1):
        result += X[j]
    ans = result
    for j in range(2*K+1, l):
        if j%2 == 1:
            result = result - X[j-2*K-1] - X[j -2*K]
        result += X[j]
        ans = max(ans, result)
print(ans)
n = input()
found = 0
for i in n:
        if i == "9":
                print("Yes")
                found = 1
                break

if(!found):
        print("No")


### FIXED CODE ###

n = input()
found = 0
for i in n:
        if i == "9":
                print("Yes")
                found = 1
                break

if(not found):
        print("No")
n, u, v = map(int, input().split())
u -= 1
v -= 1
ab = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = map(int, input().split())
    ab[a - 1].append(b - 1)
    ab[b - 1].append(a - 1)

def bfs1(pos, before_pos):
    for next_pos in ab[pos]:
        if next_pos == before_pos:
            continue
        if next_pos == u:
            return True, [pos]
        tf, root = bfs1(next_pos, pos)
        if tf:
            root.append(pos)
            return True, root
    return False, []
    
root = bfs1(v, -1)[1]
root = root[::-1]
root.append(v)
n = (len(root)) // 2

max_len = 0

def bfs2(pos, before_pos, cnt):
    global max_len
    cnt += 1
    max_len = max(max_len, cnt)
    if cnt < n - 1:
        bfs2(root[cnt + 1], pos, cnt)
    else:
        for next_pos in ab[pos]:
            if next_pos == before_pos:
                continue
            bfs2(next_pos, pos, cnt)


bfs2(v, -1, -1)
ans = max_len - 1
ans = max(ans, 0)
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)

n, u, v = map(int, input().split())
u -= 1
v -= 1
ab = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = map(int, input().split())
    ab[a - 1].append(b - 1)
    ab[b - 1].append(a - 1)

def dfs1(pos, before_pos):
    for next_pos in ab[pos]:
        if next_pos == before_pos:
            continue
        if next_pos == u:
            return True, [pos]
        tf, root = dfs1(next_pos, pos)
        if tf:
            root.append(pos)
            return True, root
    return False, []
    
root = dfs1(v, -1)[1]
root = root[::-1]
root.append(u)
n = (len(root) + 1) // 2
pos = root[n]
before_pos = root[n - 1]

max_len = n

def dfs2(pos, before_pos, cnt):
    global max_len
    cnt += 1
    max_len = max(max_len, cnt)
    if cnt < n - 1:
        dfs2(root[cnt + 1], pos, cnt)
    else:
        for next_pos in ab[pos]:
            if next_pos == before_pos:
                continue
            dfs2(next_pos, pos, cnt)


dfs2(pos, before_pos, n - 1)
ans = max_len - 1
ans = max(ans, 0)
print(ans)
n,k = map(int,input().split())
l = map(int,input().split())
l.sort(reverse=True)
print(sum(l[0:k]))

### FIXED CODE ###

n,k = map(int,input().split())
l = [int(i) for i in input().split()]
l.sort(reverse=True)
print(sum(l[0:k]))
n, m = map(int, input().split())

memo = [-1] * (10 ** 6 + 100)

g = [[] for i in range(n + 1)]

for i in range(m):
    x, y = map(int, input().split())
    g[y].append(x)


def dfs(i):
    if memo[i] != -1:
        return memo[i]
    if not g[i]:
        return 0
    else:
        memo[i] = max(dfs(v) for v in g[i]) + 1
        return memo[i]


for i in range(1, n+1):
    dfs(i)

print(max(memo))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6 + 100)
n, m = map(int, input().split())

memo = [-1] * (10 ** 6 + 100)

g = [[] for i in range(n + 1)]

for i in range(m):
    x, y = map(int, input().split())
    g[y].append(x)


def dfs(i):
    if memo[i] != -1:
        return memo[i]
    if not g[i]:
        return 0
    else:
        memo[i] = max(dfs(v) for v in g[i]) + 1
        return memo[i]


for i in range(1, n+1):
    dfs(i)

print(max(memo))
=int(input())
if l==1:
    print(float(1))
else:
    print(l/3**3)  

### FIXED CODE ###

l=float(input())
print((l/3)**3)