Harryxun/stf_run huggingface dataset:
a, op, b = input().split()
a = int(a)
b = int(b)
if op = '+':
  print(a + b)
else:
  print(a - b)

### FIXED CODE ###

a, op, b = input().split()
a = int(a)
b = int(b)
if op == '+':
  print(a + b)
else:
  print(a - b)
import sys

[Width, Height, x, y, r] = [int(x) for x in sys.stdin.readline().stlip()]

lower_x = r
lower_y = r
upper_x = Width - r
upper_y = Height -r 

if lower_x <= x <= upper_x and lower_y <= y <= upper_y:
   print("Yes")
else:
   print("No")

### FIXED CODE ###

import sys

[Width, Height, x, y, r] = [int(x) for x in sys.stdin.readline().split()]

lower_x = r
lower_y = r
upper_x = Width - r
upper_y = Height -r 

if lower_x <= x <= upper_x and lower_y <= y <= upper_y:
   print("Yes")
else:
   print("No")
N,A,B=map(int, input().split())

s=N//(A+B)
NA=N%(A+B)
if(A!=0):
  if(NA<A):
    sA=0
    sAG=NA
  else:
    sA=1
    sAG=0
else:
  sA=0
print(s*A+sA*A+sAG)

### FIXED CODE ###

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

s=N//(A+B)
NA=N%(A+B)
if(A!=0):
  if(NA<A):
    sA=0
    sAG=NA
  else:
    sA=1
    sAG=0
else:
  sA=0
  sAG=0
print(s*A+sA*A+sAG)
def solve(string):
    flag, *ab = map(int, string.split())
    return str(sum(ab)) if flag - 1 else "Hello World"


if __name__ == '__main__':
    flag = int(input())
    if flag - 1:
        flag = "{}\n".format(flag) + "\n".join([input(), input()])
    print(solve(flag))


### FIXED CODE ###

def solve(string):
    flag, *ab = map(int, string.split())
    return str(sum(ab)) if flag - 1 else "Hello World"


if __name__ == '__main__':
    flag = int(input())
    if flag - 1:
        flag = "{}\n".format(flag) + "\n".join([input(), input()])
    print(solve(str(flag)))
#coding: utf-8

value = input()

list = value.split()

for i in range(len(lise)):
  list[i] = int(list[i])
  
sum = list[0] + list[1] + list[2]

if sum >= 22:
  print("bust")
else:
  print("win")

### FIXED CODE ###

#coding: utf-8

value = input()

list = value.split()

for i in range(len(list)):
  list[i] = int(list[i])
  
sum = list[0] + list[1] + list[2]

if sum >= 22:
  print("bust")
else:
  print("win")
import numpy as np
from scipy import sparse
from scipy.sparse.linalg import inv
N = int(input())
a_list = list(map(int, input().split()))


m = np.zeros((N, N))

for i in range(N):
    m[i, i] = 0.5
    if i+1 == N:
        m[i, 0] = 0.5
    else:
        m[i, i+1] = 0.5

m = sparse.csc_matrix(m)
im = sparse.linalg.inv(m)
print(' '.join(map(str, list(im.dot(np.array(a_list)).astype(int)))))


### FIXED CODE ###

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

result = [0] * N
for i in range(N):
    result[0] += a_list[i] * (1 if i % 2 == 0 else -1)

for i in range(1, N):
    result[i] = 2 * a_list[i-1] - result[i-1]

print(' '.join(map(str, result)))
def move(s, i, count, before):
    if s[i] == before:
        if s[i] == 'R':
            return move(s, i+1, count+1, s[i])
        else:
            return move(s, i-1, count+1, s[i])
    else:
        if count % 2 == 0:
            return i
        else:
            if s[i] == 'R':
                return i + 1
            else:
                return i - 1

s = list(input())
ans = [0] * len(s)

for child in range(len(s)):
    if s[child] == 'R':
        ans[move(s, child + 1, 1, s[child])] += 1
    else:
        ans[move(s, child - 1, 1, s[child])] += 1
    
print(*ans)

### FIXED CODE ###

#入力を受け取る
s = list(input())
ans = [0] * len(s)

#左から見ていく.Rだけ位置を決定する.

undifined_childlen = 0

for i in range(len(s)):
    if s[i] == 'R':
        undifined_childlen += 1
    else:
        if undifined_childlen % 2 == 0:
            ans[i] += undifined_childlen // 2
            ans[i-1] += undifined_childlen // 2
        else:
            ans[i] += undifined_childlen // 2
            ans[i-1] += (undifined_childlen // 2) + 1
    
        undifined_childlen = 0
        

#右から見ていく.Lだけ位置を決定する.
undifined_childlen = 0

for i in list(reversed(range(len(s)))):
    if s[i] == 'L':
        undifined_childlen += 1
    else:
        if undifined_childlen % 2 == 0:
            ans[i+1] += undifined_childlen // 2
            ans[i] += undifined_childlen // 2
        else:
            ans[i+1] += (undifined_childlen // 2) + 1
            ans[i] += (undifined_childlen // 2)
    
        undifined_childlen = 0

print(*ans)
def dijkstra(s):
    #始点sから各頂点への最短距離
    #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
    d = [float("inf")] * n
    used = [False] * n
    d[s] = 0
    
    while True:
        v = -1
        #まだ使われてない頂点の中から最小の距離のものを探す
        for i in range(n):
            if (not used[i]) and (v == -1):
               v = i
            elif (not used[i]) and d[i] < d[v]:
                v = i
        if v == -1:
               break
        used[v] = True
               
        for j in range(n):
               d[j] = min(d[j],d[v]+cost[v][j])
    return d
 
Xs,Ys,Xt,Yt = map(int,input().split())
n = int(input())
p = [[Xs,Ys,0],[Xt,Yt,0]]
for i in range(2,n+2):
    p.append(map(int,input().split()))
cost = [[0]*(n+2)for i in range(n+2)]
 
for i in range(n+2):
    for j in range(i,n+2):
        cost[i][j] = cost[j][i] =  max(((p[i][0]-p[j][0])**2+(p[i][1]-p[j][1])**2)**0.5 - p[i][2] - p[j][2],0)
#cost = tuple(cost)
n += 2
 
res = dijkstra(0)
print(1)

### FIXED CODE ###

Xs,Ys,Xt,Yt = map(int,input().split())
n = int(input())
p = [(Xs,Ys,0),(Xt,Yt,0)]
for i in range(2,n+2):
    p.append(tuple(map(int,input().split())))
cost = [[0]*(n+2)for i in range(n+2)]

for i in range(n+2):
    for j in range(i,n+2):
        cost[i][j] = cost[j][i] =  max(((p[i][0]-p[j][0])**2+(p[i][1]-p[j][1])**2)**0.5 - p[i][2] - p[j][2],0)
n += 2
s = 0
#始点sから各頂点への最短距離
#n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
d = [float("inf")] * n
used = [False] * n
d[s] = 0
    
while True:
    v = -1
    #まだ使われてない頂点の中から最小の距離のものを探す
    for i in range(n):
        if (not used[i]) and (v == -1):
           v = i
        elif (not used[i]) and d[i] < d[v]:
            v = i
    if v == -1:
           break
    used[v] = True
           
    for j in range(n):
           d[j] = min(d[j],d[v]+cost[v][j])
print(d[1])
N=int(input())
ab=[[] for _ in range(N)]
for _ in range(N-1):
  a,b=map(int,input().split())
  ab[a-1].append(b)
  ab[b-1].append(a)


def dfs(p,pa):
  global path
  if p==N:
    path=pa
  else:
    for i in ab[p-1]:
      if i not in pa:
        dfs(i,pa+[i])

dfs(1,[1])

def dfs2(p):
  a=0
  seen.append(p)
  for i in ab[p-1]:
    if i in path:
      pass
    elif i in seen:
      pass
    else:
      a+=dfs2(i)
  return 1+a

ff=0
sf=0
L=len(path)
for i in range(L):
  seen=[]
  if i<=(L-1)//2:
    ff+=dfs2(path[i])
  else:
    sf+=dfs2(path[i])
    
if ff>sf:
  print("Fennec")
else:
  print("Snuke")

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
N=int(input())
ab=[[] for _ in range(N)]
for _ in range(N-1):
  a,b=map(int,input().split())
  ab[a-1].append(b)
  ab[b-1].append(a)
"""
N=10**5
ab=[[]]*N
ab[0]=[2]
ab[N-1]=[N-1]
for i in range(1,N-1):
  ab[i]=[i,i+2]
"""
par=[0]*N
  
def dfs(pre,p):
  global path
  par[p-1]=pre
  if p==N:
    pass
  else:
    for i in ab[p-1]:
      if i!=pre:
        dfs(p,i)

dfs(-1,1)
path=[N]
p=N
while p!=1:
  p=par[p-1]
  path.append(p)
path.reverse()

spath=set(path)

def dfs2(pre,p):
  a=0
  for i in ab[p-1]:
    if i in spath:
      pass
    elif i==pre:
      pass
    else:
      a+=dfs2(p,i)
  return 1+a

ff=0
sf=0
L=len(path)
for i in range(L):
  if i<=(L-1)//2:
    ff+=dfs2(-1,path[i])
  else:
    sf+=dfs2(-1,path[i])
    
if ff>sf:
  print("Fennec")
else:
  print("Snuke")
s=input()
k=int(input())
a=[]
a = [s[i:j] for i in range(0,len(s)) for j in range(1,len(s)+1) if i != j]
a.remove("")
a=sorted(a)
b=[]
for i in a:
    if i not in b:
        b.append(i)
print(b[k-1])


### FIXED CODE ###

s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])
p,q,r=map(int,input().split())
print(min(p+q,q+r,r+p)

### FIXED CODE ###

p,q,r=map(int,input().split())
print(min(p+q,q+r,r+p))
import sys

rand = random.randint

def prime(n):
	if n == 2: return True
	if n < 2 or n & 1 == 0: return False
	return pow(2, n-1, n) == 1

a = [prime(i) for i in range(1000000)]

for s in sys.stdin:
	i = int(s)
	print(a[:i+1].count(True))

### FIXED CODE ###

import sys

a = [True] * 1000000

for i in range(2,1000000):
	if(a[i-1]):
		for j in range(i**2-1, 1000000, i):
			a[j] = False

for s in sys.stdin:
	print(a[1:int(s)].count(True))
N=int(input())
A=list(map(int, input().split()))

temp_set=set()

l = []

for a in A:
  if a in temp_set:
    l.append(a)
    temp_set.remove(a)
  else:
    temp_set.add(a)
    
l.sort()
print(l[-2]*l[-1])

### FIXED CODE ###

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

temp_set=set()

l = []

for a in A:
  if a in temp_set:
    l.append(a)
    temp_set.remove(a)
  else:
    temp_set.add(a)
    
l.sort()
if len(l)>=2:
  print(l[-2]*l[-1])
else:
  print(0)
h,w=map(int,input().split())
s=[list(input())for i in range(h)]
a=[[float("inf")]*w for i in range(h)]
b=[[False]*w for i in range(h)]
def f(x,y,t):
    if 0<=x<h and 0<=y<w:
        if s[x][y]=="#":
            if b[x][y]==False:
                a[x][y]=0
                b[x][y]=True
                f(x,y+1,1)
                f(x+1,y,1)
                f(x-1,y,1)
                f(x,y-1,1)
        else:
            if a[x][y]>t:
                a[x][y]=t
                f(x,y+1,t+1)
                f(x+1,y,t+1)
                f(x-1,y,t+1)
                f(x,y-1,t+1)
for i in range(h):
    for j in range(w):
        if s[i][j]=="#":
            f(i,j,0)
            break
print(max(max(i)for i in a))

### FIXED CODE ###

import numpy as np
from scipy.ndimage import distance_transform_cdt as d
h,w=map(int,input().split())
s=[[1 if i=="." else 0 for i in input()]for i in range(h)]
a=d(s,metric='taxicab')
print(a.max())
N, M = map(int, input().split())
PYI = []
for i in range(M):
  pi, yi = map(int, input().split())
  PYI.append("{:06}{:06}{:06}".format(pi, yi, i))
ID = ["" for i in range(M)]
PYI.sort()
count = 0
for i in range(M):
  y = int(PYI[i][6 : 12])
  if i == 0 or PYI[i][0 : 6] != PYI[i - 1][0 : 6]:
    count = 1
  else:
    count += 1
  ID[int(PYI[i][12 :])] = "{}{:06}".format(PYI[i][0 : 6], count)
for i in range(M):
  print(ID[i])

### FIXED CODE ###

N, M = map(int, input().split())
iPYx = []
for i in range(M):
  P, Y = map(int, input().split())
  iPYx.append([i, P, Y])

iPYx.sort(key = lambda x: (x[1], x[2]))
cnt = 0
for i in range(M):
  if i == 0 or iPYx[i][1] != iPYx[i - 1][1]:
    cnt = 1
  else:
    cnt += 1
  iPYx[i].append(cnt)
iPYx.sort(key = lambda x: x[0])
for i in range(M):
  print("{:06}{:06}".format(iPYx[i][1], iPYx[i][3]))
def dp(v):# 頂点nから始まる最長経路を返す.
  if memo[v] != -1: return memo[v]
  answ = 0

  for to in Grap[v]:
    answ = max(answ, dp(to)+1)
  memo[v] = answ
  return answ


N, M = map(int, input().split())
Grap = {j+1:[] for j in range(N)}
memo = {j+1: -1 for j in range(N+5)} # 各頂点からの最長経路をメモ. -1で初期化.

for _ in range(M):
  x, y = map(int, input().split())
  Grap[x].append(y)

ans = 0
for n in range(1,N+1):
  ans = max(ans, dp(n))
print(ans)




### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
N, M = map(int, input().split())
G = [[] for _ in range(N+1)]
MEMO = [-1 for _ in range(N+1)]

for _ in range(M):
  x, y = map(int, input().split())
  G[x].append(y)


def dp_LP(v):# 頂点nから始まる最長経路を返す.
  if MEMO[v] != -1:
    return MEMO[v]
  else:
    ans = 0
    for i in G[v]:
      ans = max(ans, dp_LP(i)+1)
    MEMO[v] = ans

    return ans



answer = 0
for n in range(1,N+1):
  answer = max(answer, dp_LP(n))
print(answer)
import sys
read = sys.stdin.read


n, *ab = map(int, read().split())
ans = [0]*(n-1)
edges = [[]for _ in range(n)]
used = [0]*n

for i, a, b in zip(range(n-1), *[iter(ab)] * 2):
    edges[a].append([b, i])

for node in range(n):
    unable = used[node]
    color = 1

    for to, id in edges[node]:
        if color == unable:
            color += 1
        ans[id] = str(color)
        used[to] = color
        color += 1

print(max(used))
print('\n'.join(ans))

### FIXED CODE ###

import sys
input = sys.stdin.readline


n = int(input())
routes = []
dic = [{}] * n
edges = [[]for _ in range(n)]
used = [0]*n

for i in range(n-1):
    a, b = map(int, input().split())
    routes.append([a-1, b-1])
    edges[a-1].append(b-1)

for node in range(n):
    unanle = used[node]
    count = 1
    if count == unanle:
        count += 1
    for to in edges[node]:
        dic[node][to] = count
        used[to] = count
        count += 1
        if count == unanle:
            count += 1

print(max(used))
for _from, to in routes:
    print(dic[_from][to])
x,k,d = map(int,input().split())

if x >= 0 :
    a = abs(x//d)
    if a <= k :
        if (k - a) % 2 == 0 :
            print(abs(x-a*d))
        else :
            print(abs(x-(a+1)*d))
    else :
        print(abs(x-k*d))
else :
    if x%d == 0 :
        a = abs(x//d)
    else :
        a = abs(x//d+1)
            if a <= k :
                if (k - a) % 2 == 0 :
                    print(abs(x+a*d))
                else :
                    print(abs(x+(a+1)*d))
            else :
                print(abs(x+k*d))

### FIXED CODE ###

s = input()
if s == 'RRR' :
    print(3)
if s == 'SRR' :
    print(2)
if s == 'RSR' :
    print(1)
if s == 'RRS' :
    print(2)
if s == 'SSR' :
    print(1)
if s == 'RSS' :
    print(1)
if s == 'SRS' :
    print(1)
if s == 'SSS' :
    print(0)
N, X = map(int, input().split())

a = [2**(i+2) - 3 for i in range(N+1)]
p = [2**(i+1) - 1 for i in range(N+1)]

ans = 0

def calc(n, x):
    if n == 0:
        return 1
    if x == 1:
        return 0
    elif 1 < x < a[n-1]+1:
        return calc(n-1, x-1)
    elif x == 2 + a[n-1]:
        return p[n-1] + 1
    elif 2+ a[n-1] < x < 3 + 2*a[n-1]:
        return p[n-1] + 1 + calc(n-1, x-2-a[n-1])
    elif x == 3 + 2*a[n-2]:
        return 2*p[n-1] + 1


ans = calc(N, X)
print(ans)

### FIXED CODE ###

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

a = [2**(i+2) - 3 for i in range(N+1)]
p = [2**(i+1) - 1 for i in range(N+1)]

ans = 0

def calc(n, x):
    if n == 0:
        return 1
    if x == 1:
        return 0
    elif 1 < x < a[n-1]+2:
        return calc(n-1, x-1)
    elif x == 2 + a[n-1]:
        return p[n-1] + 1
    elif 2 + a[n-1] < x < 3 + 2*a[n-1]:
        return p[n-1] + 1 + calc(n-1, x-2-a[n-1])
    elif x == 3 + 2*a[n-1]:
        return 2*p[n-1] + 1


ans = calc(N, X)
print(ans)
n, x = map(int, input().split())
xlis = list(map(int, input().split()))
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

d = gcd(abs(xlis[0]-x), abs(xlis[1]-x))
for i in range(2, n):
    d = gcd(d, abs(xlis[i]-x))
print(d)

### FIXED CODE ###

n, x = map(int, input().split())
xlis = list(map(int, input().split()))
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)
if n > 1:
    d = gcd(abs(xlis[0]-x), abs(xlis[1]-x))
    for i in range(2, n):
        d = gcd(d, abs(xlis[i]-x))
    print(d)
else:
    print(abs(xlis[0] - x))
#coding utf-8
N,M=map(int,input().split())
A=list(map(int,input().split())) 
BC=[[int(i) for i in input().split()] for i in range(M)]
A.sort()
BC.sort(key=lambda x:x[1])
BC.reverse()

k=0
t=0
for i in range(M):
  if t==1 or k==N:
    break
  for j in range(BC[i][0]):
    if BC[i][1]>A[k]:
      A[k]=BC[i][1]
      k+=1
    else:
      t=1
      break
      
      
print(sum(A))    

### FIXED CODE ###

#coding utf-8
N,M=map(int,input().split())
A=list(map(int,input().split())) 
BC=[[int(i) for i in input().split()] for i in range(M)]
A.sort()
BC.sort(key=lambda x:x[1])
BC.reverse()

k=0
t=0
for i in range(M):
  if t==1 or k==N:
    break
  for j in range(BC[i][0]):
    if BC[i][1]>A[k]:
      A[k]=BC[i][1]
      k+=1
      if k==N:
        break
    else:
      t=1
      break
      
      
print(sum(A))
b_list = [int(input() for i in range(int(input())))]
r_list = [int(input() for i in range(int(input())))]

ans = 0 
for i in list(set(b_list)):
  if ans <= b_list.count(i) - r_list.count(i):
    ans = b_list.count(i) - r_list.count(i)
    
print(ans)

### FIXED CODE ###

b_list = [input() for i in range(int(input()))]
r_list = [input() for i in range(int(input()))]

ans = 0 
for i in list(set(b_list)):
  if ans <= b_list.count(i) - r_list.count(i):
    ans = b_list.count(i) - r_list.count(i)
    
print(int(ans))
x=input()
x.solt()
if x==abc:
	print("YES")
else:
	print("NO")


### FIXED CODE ###

print("Yes" if len(set(input())) == 3 else "No")
n, x = map(int, input().split())
list = []
for i in range(n):
    list.append(input())

print(n+(x-sum(list))//min(list))

### FIXED CODE ###

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

print(n+(x-sum(list))//min(list))
X = input()

if 400 <= X <= 599:
    print(8)
if 600 <= X <= 799:
    print(7)
if 800 <= X <= 999:
    print(6)
if 1000 <= X <= 1199:
    print(5)
if 1200 <= X <= 1399:
    print(4)
if 1400 <= X <= 1599:
    print(3)
if 1600 <= X <= 1799:
    print(2)
if 1800 <= X <= 1999:
    print(1)

### FIXED CODE ###

X = int(input())

if 400 <= X <= 599:
    print(8)
if 600 <= X <= 799:
    print(7)
if 800 <= X <= 999:
    print(6)
if 1000 <= X <= 1199:
    print(5)
if 1200 <= X <= 1399:
    print(4)
if 1400 <= X <= 1599:
    print(3)
if 1600 <= X <= 1799:
    print(2)
if 1800 <= X <= 1999:
    print(1)
N = np.array([str(i) for i in range(1,int(input())+1)])
C = np.zeros((10,10), dtype=np.int)
ans = 0

# C[i][j](0≦i,j≦9)のテーブルを構築する: O(N)
for n in N:
    C[int(n[0])][int(n[-1])] += 1

for i in range(1,9+1):
    for j in range(1,9+1):
        ans += C[i][j] * C[j][i]

print(ans)

### FIXED CODE ###

import numpy as np

def main():
    N = np.array([str(i) for i in range(1,int(input())+1)])
    C = np.zeros((10,10), dtype=np.int)
    ans = 0

    # C[i][j](0 <= i,j <= 9)のテーブルを構築する: O(N)
    for n in N:
        C[int(n[0])][int(n[-1])] += 1

    for i in range(1,9+1):
        for j in range(1,9+1):
            ans += C[i][j] * C[j][i]

    print(ans)

if __name__ == '__main__':
    main()
from math import *
A,B=list(map(input().split()))
x=ceil(max(A/0.08,B/0.1))
y=min((A+1)/0.08,(B+1)/0.1)
if x<y:
  print(x)
else:
  print(-1)

### FIXED CODE ###

from math import *
A,B=list(map(int, input().split()))
x=ceil(max(A/0.08,B/0.1))
y=min((A+1)/0.08,(B+1)/0.1)
if x<y:
    print(x)
else:
    print(-1)
list = list(map(int, input()))
k = int(input())

print(max(list)*(2*k))

### FIXED CODE ###

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

print(max(list)*(2**k)+sum(list)-max(list))
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
inp = sys.stdin.buffer.readline
 
from numba import njit
import numpy as np

def resolve():
    @njit('i8,i8,i8[::1]',cache=True)
    def solve(N, K, A):
        for _ in range(K):
            imos_table = np.zeros(N + 1, np.int64)
            for i, a in enumerate(A):
                # 配列の個数を超えないように注意
                imos_table[max(i - a, 0)] += 1
                imos_table[min(i + a + 1, N)] -= 1
            A = np.cumsum(imos_table)[:-1]
            if np.all(A == N):
                print(*A)
                return
        else:
            print(*A)

    N, K = map(int, input().split())
    A = np.array(list(map(int, input().split())), np.int64)
    solve(N, K, A)
        
if __name__ == "__main__":
    resolve()

### FIXED CODE ###


from itertools import accumulate
def resolve():

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

    for _ in range(K):
        imos_table = [0]*(N+1)
        for i, a in enumerate(A):
            # 配列の個数を超えないように注意
            imos_table[max(i - a, 0)] += 1
            imos_table[min(i + a + 1, N)] -= 1
        A = list(accumulate(imos_table))[:-1]
        if all([True if a == N else False for a in A]):
            print(*A)
            return
    else:
        print(*A)

if __name__ == "__main__":
    resolve()
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.append(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)
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)

thold = sum(a) // (4 * m)

if a[m] <= thold:
    print('No')
else:
    print('Yes')



### FIXED CODE ###

from math import ceil

n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)

thold = ceil(sum(a) / (4 * m))

if a[m-1] < thold:
    print('No')
else:
    print('Yes')
import sympy

R = float(input())
2*sympy.pi.evalf(100)*R

### FIXED CODE ###

import math
R = int(input())
print(2*math.pi*R)
N=list(map(int,(input().split(" "))))
teast=[]
K = N[3]
total=[]
c=0
for i in range(3):
    teast.append(list(map(int,input().split(" "))))
A=sorted(teast[0],reverse=True)
B=sorted(teast[1],reverse=True)
C=sorted(teast[2],reverse=True)

for i in range(len(A)):

    for j in range(len(B)):

        for k in range(len(C)):
            if i*j*k>K:
                break
            else:
                total.append(A[i]+B[j]+C[k])

total_s=sorted(total,reverse=True)

for i in range(K):
    print(total_

### FIXED CODE ###

from heapq import *

Q=[]
teast=[]
X,Y,Z,K=list(map(int,input().split(" ")))

for i in range(3):
    teast.append(list(map(int,input().split(" "))))

A=sorted(teast[0],reverse=True)
B=sorted(teast[1],reverse=True)
C=sorted(teast[2],reverse=True)

arg_hash={}
heappush(Q,(-A[0]-B[0]-C[0],0,0,0))
arg_hash[(0,0,0)]=1

for k in range(K):
    ans=heappop(Q)
    a,b,c=ans[1:]
    print(-ans[0])
    argA=(a+1,b,c)
    if a <X-1 and( not argA in arg_hash):
        arg_hash[argA]=1
        heappush(Q,(-A[a+1]-B[b]-C[c],)+argA)
    argB=(a,b+1,c)
    if b <Y-1 and( not argB in arg_hash):
        arg_hash[argB]=1
        heappush(Q,(-A[a]-B[b+1]-C[c],)+argB)
    argC=(a,b,c+1)
    if c <Z-1 and( not argC in arg_hash):
        arg_hash[argC]=1
        heappush(Q,(-A[a]-B[b]-C[c+1],)+argC)
a = [input() for i in range(4)]
ans = 0

for i in range(1,a[0]+1):
  if i<a[1]:
    ans += a[2]
  else:
    ans += a[3]

print(ans)

### FIXED CODE ###

a = [int(input()) for i in range(4)]
ans = 0

for i in range(1,a[0]+1):
  if i<=a[1]:
    ans += a[2]
  else:
    ans += a[3]

print(ans)
n = int(input())
v = map(int,input().split())
c = map(int,input().split())
cnt = 0
for i in range(n):
    if v[i] > c[i]:
        cnt += (v[i] - c[i])
    else:
        cnt += 0    
print(cnt)

### FIXED CODE ###

a,b,t = map(int,input().split())
n = t // a
print(n*b)
import numpy as np


def num_even_odd(num):
  num_odd = np.ceil(num/2)
  num_even = num//2
  return num_odd, num_even


def main(num):
  odds, evens = num_even_odd(num)
  print(odds * evens)


if __name__ == "__main__":
  main(input())

### FIXED CODE ###

import numpy as np


def num_even_odd(num):
    num_odd = np.ceil(num/2)
    num_even = num//2
    return num_odd, num_even


def main(num):
    odds, evens = num_even_odd(num)
    print(int(odds * evens))


if __name__ == "__main__":
    main(int(input()))