Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n,K=map(int,input().split())
    dp=[[[0]*2600 for _ in range(55)] for _ in range(55)]
    dp[0][0][0]=1
    for i in range(n):
        for j in range(n):
            for k in range(K+1):
                dp[i+1][j][k+2*j]+=(2*j+1)*dp[i][j][k]
                dp[i+1][j][k+2*j]%=MOD
                dp[i+1][j+1][k+2*(j+1)]+=dp[i][j][k]
                dp[i+1][j+1][k+2*(j+1)]%=MOD
                dp[i+1][j-1][k+2*(j-1)]+=j*j*dp[i][j][k]
                dp[i+1][j-1][k+2*(j-1)]%=MOD
    print(dp[n][0][K])
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n,K=map(int,input().split())
    dp=[[[0]*2700 for _ in range(55)] for _ in range(55)]
    dp[0][0][0]=1
    for i in range(n):
        for j in range(i+1):
            for k in range(K+1):
                dp[i+1][j][k+2*j]+=(2*j+1)*dp[i][j][k]
                dp[i+1][j][k+2*j]%=MOD
                dp[i+1][j+1][k+2*(j+1)]+=dp[i][j][k]
                dp[i+1][j+1][k+2*(j+1)]%=MOD
                if(j):
                    dp[i+1][j-1][k+2*(j-1)]+=j*j*dp[i][j][k]
                    dp[i+1][j-1][k+2*(j-1)]%=MOD
    print(dp[n][0][K])
resolve()
import math

r = int(input())
print("{:.5f} {:.5f}".format(r * r * math.pi, 2 * r * math.pi))

### FIXED CODE ###

from math import pi

r = float(input())
area = r**2 * pi
length = 2 * r * pi
print("{:.6f} {:.6f}".format(area, length))
N=int(input())
ans =1
A = list(map(int,input().split()))
if i in A:
        i =0
        print(0)
        exit()
for i in A:
      
       ans *=i
       if ans >10**18:
               print(-1)
               exit()
print(ans)


### FIXED CODE ###

N=int(input())
ans =1
A = list(map(int,input().split()))
for i in A:
        if i == 0:

               print(0)
               exit()
for i in A:
      
       ans *=i
       if ans >10**18:
               print(-1)
               exit()
print(ans)
import sys
input = sys.stdin.readline
H, W = tuple(map(int, input().split()))
P = [[-int(i) for i in input().rstrip().replace("#", "0").replace(".", "1")]
     for i in range(H)]

queue_set = set()
for h in range(H):
    for w in range(W):
        if P[h][w] == 0:
            for dh, dw in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
                if 0 <= h+dh < H and 0 <= w+dw < W and P[h+dh][w+dw] == -1:
                    queue_set.add((h+dh)*W+w+dw)
        elif h == 0 or h == H-1 or w == 0 or w == W-1:
            queue_set.add(h*W+w)
m = 0

queue = [[q//W, q % W, 0] for q in queue_set]
idx = 0
while len(queue) != idx+1:
    h, w, cnt = queue[idx]
    idx += 1
    if P[h][w] == -1:
        P[h][w] = cnt+1
        a = 0
        for dh, dw in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
            if 0 <= h+dh < H and 0 <= w+dw < W:
                a = P[h+dh][w+dw] if P[h+dh][w+dw] > a else a
                if P[h+dh][w+dw] == -1:
                    queue += [[h+dh, w+dw, cnt+1]]

        m = m if cnt+1 + a < m else cnt+1 + a

print(m)


### FIXED CODE ###

H, W = tuple(map(int, input().split()))
func = (lambda x: 0 if x == "#" else -1)
func_in = (lambda h, w: 0 <= h < H and 0 <= w < W)
P = [[func(i) for i in input()] for i in range(H)]

queue_set = set()
zeros = set()
for h in range(H):
    for w in range(W):
        if P[h][w] == 0:
            zeros.add((h)*W+w)
            for dh, dw in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
                if func_in(h+dh, w+dw) and P[h+dh][w+dw] == -1:
                    queue_set.add((h+dh)*W+w+dw)
m = 0

queue = [[q // W, q % W, 0] for q in queue_set]
queue_set |= zeros
idx = 0
cnt = 0
while len(queue) > idx:
    h, w, cnt = queue[idx]
    idx += 1
    cnt += 1
    P[h][w] = cnt
    a = 0
    for dh, dw in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
        if func_in(h+dh, w+dw) and (h+dh)*W+w+dw not in queue_set:
            queue += [[h + dh, w + dw, cnt]]
            queue_set.add((h+dh)*W+w+dw)
print(cnt)
r = int(input())
s = input()
 
if i < 2:
  return

i = int(r/2)
before = s[i:]
after = s[:i]
 
if before == after:
	print('Yes')
else:
  	print('No')

### FIXED CODE ###

r = int(input())
s = input()
 
i = int(r/2)
before = s[i:]
after = s[:i]
 
if before == after:
	print('Yes')
else:
  	print('No')
N=int(input())
P=list(map(int,input().split()))

if P[0] < P[N-1] and P[N-1] > P[2] and P[N-2] > P[0]:
  print("NO")
else:
  print("YES")

### FIXED CODE ###

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

sort_p=sorted(p)
cnt=0

#i,jにpとソートしたpを代入して比較
for i,j in zip(p,sort_p):
  if i != j:
    cnt += 1

if cnt <= 2:
  print("YES")
else:
  print("NO")
A=int(input())
B=int(input())
if A%2!=0 and B%2!=0:
        print("Yes")
else :
        print("No") 

### FIXED CODE ###

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

if A%2!=0 and B%2!=0:
        print("Yes")
else :
        print("No")
def main():
    N, M = map(int, input().split())
    A = sorted(list(map(int, input().split())))
    BC = []
    for _ in range(M):
        B, C = map(int, input().split())
        BC.append((B, C))
    BC = sorted(BC, key=lambda x: x[1], reverse=True)
    i = 0
    for b, c in BC:
        for _ in range(b):
            if A[i] >= c:
                break
            A[i] = c
            i += 1
    print(sum(A))


main()


### FIXED CODE ###

def main():
    N, M = map(int, input().split())
    A = sorted(list(map(int, input().split())))
    BC = []
    for _ in range(M):
        B, C = map(int, input().split())
        BC.append((B, C))
    BC = sorted(BC, key=lambda x: x[1], reverse=True)
    i = 0
    for b, c in BC:
        for _ in range(b):
            if i >= len(A) or A[i] >= c:
                break
            A[i] = c
            i += 1
    print(sum(A))


main()
from collections import Counter

n = int(input())
L = [Counter(str(input())) for _ in range(n)]
ans = ''
for k in L[0]:
    for i in range(1, n):
        m = L[0][k]
        if L[i][k] < L[0][k]:
            m = min(m, L[i][k])
    ans = ans + k * m
print(ans)


### FIXED CODE ###

from collections import Counter

n = int(input())
L = [Counter(str(input())) for _ in range(n)]
C = sorted(L[0])
ans = ''
for k in C:
    m = L[0][k]
    for i in range(n):
        m = min(m, L[i][k])
    ans += k * m
print(ans)
import math
from itertools import accumulate

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

L = list(accumulate(a, math.gcd))
R = list(accumulate(reversed(a), math.gcd)) 

ans = 0
for i in range(1,n):
    ans = max(math.gcd(L[i],R[i]),ans)
    
print(ans)

### FIXED CODE ###

from fractions import gcd

n = int(input())
list_ = list(map(int, input().strip().split()))

gcd_from_left = [0]
gcd_from_right = [0]
for i in range(n):
    gcd_from_left.append(gcd(gcd_from_left[i], list_[i]))
    gcd_from_right.append(gcd(gcd_from_right[i], list_[-(i + 1)]))

gcd_from_left.insert(0, 0)
gcd_from_right.insert(0, 0)
gcd_from_right.reverse()

print(max(gcd(gcd_from_left[i], gcd_from_right[i]) for i in range(n + 2)))
N = int(input())
M = int(input())
A = list(map(int, input().split()))
a = sum(A)
ans = N -a
if ans >= 0:
    print(ans)
else:
    print(-1)
    
        


### FIXED CODE ###

N,M = map(int, input().split())
A = list(map(int, input().split()))
a = sum(A)
ans = N -a
if ans >= 0:
    print(ans)
else:
    print(-1)
s = input()
total_1_list = [ [ 0 for i in range(10) ]  for j in range(10)]

for i in range(1,10):
    total_1_list[0][i] = 1
total_1 = 0
for i in range(1,10):
    base_1 = 1 + i * ( 10 ** (i-1) )
    total_1_list[i][1] = base_1
    base_9 = ( 10 + (9 * i) ) * 10 ** (i-1)
    for j in range(2,10):
        total_1_list[i][j] = base_9 - (i * (10 ** (i-1) ) ) * (9-j) 

ans = 0
for i in range(len(s)):
    a = int(s[::-1][i])
    if i != 0  and a == 1:
        ans += int(s[len(s)-i:])
    ans += total_1_list[i][a]
print(ans)

### FIXED CODE ###

def star(x):
    return x*(x-1)//2

def root(x):
    compress_node = []
    while parent_list[x] != x:
        compress_node.append(x)
        x = parent_list[x]   
    for i in compress_node:
        parent_list[i] = x
    return x


n, m = [ int(v) for v in input().split() ]
bridge_list = [ [ int(v)-1 for v in input().split() ] for i in range(m) ]
bridge_list.reverse()
parent_list = [ i for i in range(n) ]
connect_list = [ 1 for i in range(n) ]
total_inconvinience = star(n)
ans_list = [total_inconvinience]

for i in bridge_list:
    a, b = i
    ra, rb = root(a), root(b)
    if ra != rb:
        parent_list[ra] = rb
        rc = connect_list[rb]
        connect_list[rb] += connect_list[ra]
        total_inconvinience -= star(connect_list[rb]) - star(connect_list[ra]) - star(rc)
        connect_list[ra] = 0
    ans_list.append(total_inconvinience)

ans_list = ans_list[:-1]
ans_list.reverse()
for i in ans_list:
    print(i)
import sys
sys.setrecursionlimit(20000)
n,m = map(int,input().split())
a = [0]*m
b = [0]*m
for i in range(m):
  u,v = map(int, input().split())
  a[i] = u-1
  b[i] = v-1
par = [i for i in range(n)]
size = [1]*n
incomb = [n*(n-1)//2]*m

def root(x):
  if par[x] == x: 
    return x
  else:
    par[x] = root(par[x])
    return par[x]
    
def isSame(x,y):
  return par[x] == par[y]

def union(x,y):
  x = root(x)
  y = root(y)
  if x == y:
    return
  else:
    par[y] = x
    size[x] += size[y]
    
def size_count(x):
  return size[root(x)]

for i in reversed(range(1,m)):
  q_a = a[i]
  q_b = b[i]
  size_a = size_count(q_a)
  size_b = size_count(q_b)
  if not isSame(q_a,q_b):
    union(q_a,q_b)
    incomb[i-1] = incomb[i] - size_a*size_b
  else:
    incomb[i-1] = incomb[i]

for i in incomb:
  print(i)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
n,m = map(int,input().split())
a = [0]*m
b = [0]*m
for i in range(m):
  u,v = map(int, input().split())
  a[i] = u-1
  b[i] = v-1
par = [i for i in range(n)]
size = [1]*n
incomb = [n*(n-1)//2]*m

def root(x):
  if par[x] == x: 
    return x
  else:
    par[x] = root(par[x])
    return par[x]
    
def isSame(x,y):
  return par[x] == par[y]

def union(x,y):
  x = root(x)
  y = root(y)
  if x == y:
    return
  else:
    par[y] = x
    size[x] += size[y]
    
def size_count(x):
  return size[root(x)]

for i in reversed(range(1,m)):
  q_a = a[i]
  q_b = b[i]
  size_a = size_count(q_a)
  size_b = size_count(q_b)
  if not isSame(q_a,q_b):
    union(q_a,q_b)
    incomb[i-1] = incomb[i] - size_a*size_b
  else:
    incomb[i-1] = incomb[i]

for i in incomb:
  print(i)
import sys
from collections import Counter
input = sys.stdin.readline
N, K = map(int, input().split())
mod = 10 ** 9 + 7
e = [[] for _ in range(N + 1)]
for _ in range(N - 1):
  u, v = map(int, input().split())
  e[u].append(v)
  e[v].append(u)

s = [1]
vis = [0] * (N + 1)
order = []
parent = [0] * (N + 1)
children = [0] * (N + 1)
while len(s):
  x = s.pop()
  vis[x] = 1
  order.append(x)
  for y in e[x]:
    if vis[y]: continue
    s.append(y)
    parent[y] = x
    children[x] += 1
cs = Counter()
cr = children[1]
for y in range(2, N + 1): cs[children[y]] += 1
#print(cs, cr)
res = [0] * (K + 1)
l = 0
csmx = max(cs.keys())

for c in range(K + 1):
  if c <= 1 and (cr > 0): continue
  if c <= 2 and (len(cs) > 0): continue
  if c - 1 >= cr and (c - 2 >= csmx):
    l = c
    break
if l == 0:
  print(0)
  exit(0)

class Factorial:
  def __init__(self, n, mod):
    self.f = [1]
    for i in range(1, n + 1):
      self.f.append(self.f[-1] * i % mod)
    self.i = [pow(self.f[-1], mod - 2, mod)]
    for i in range(1, n + 1)[: : -1]:
      self.i.append(self.i[-1] * i % mod)
    self.i.reverse()
  def factorial(self, i):
    return self.f[i]
  def ifactorial(self, i):
    return self.i[i]
  def combi(self, n, k):
    return self.f[n] * self.i[n - k] % mod * self.i[k] % mod

f = Factorial(K, mod)
smcs = sum(cs.values())
res[l] = f.factorial(l) * f.ifactorial(l - cr - 1) % mod
for k, v in cs.items():
  res[l] *= pow(f.factorial(l - 2) * f.ifactorial(l - k - 2) % mod, v, mod)
  res[l] %= mod
#print(res)
revs = [0] * (K + 1)
for i in range(K + 1): revs[i] = pow(i, mod - 2, mod)
for i in range(l, K):
  res[i + 1] = res[i] * pow(i - 1, smcs, mod) % mod
  res[i + 1] *= (i + 1) * revs[i - cr] % mod
  res[i + 1] %= mod
  for k, v in cs.items():
    res[i + 1] *= pow(revs[i - k - 1], v, mod)
    res[i + 1] %= mod

print(res[-1])

### FIXED CODE ###

from collections import defaultdict as ddydd
from collections import deque as dq
N, K = map(int, input().split())
mod = 10 ** 9 + 7
Tree = ddydd(list)
for _ in range(N - 1):
  a, b = map(int, input().split())
  Tree[a].append(b)
  Tree[b].append(a)
Q = dq(list())
visited = [0] * (N + 1)
visited[1] = 1
res = K
temp = K - 1
for n in Tree[1]:
  visited[n] = 1
  Q.append(n)
  res *= temp
  res = res % mod
  temp -= 1

while Q:
  n = Q.popleft()
  temp = K - 2
  for m in Tree[n]:
    if visited[m] == 0:
      visited[m] = 1
      Q.append(m)
      res *= temp
      res = res % mod
      temp -= 1
print(res)
N,M = map(int, input().split())
x = input()
total_vote = sum(x)
count = 0
for y in x:
    if y >=(total_vote/(4*M)):
        count+=1
      
if count>=M:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

N,M = map(int, input().split())
x = list(map(int, input().split()))
total_vote = sum(x)
count = 0
for y in x:
    if y >=(total_vote/(4*M)):
        count+=1
      
if count>=M:
    print('Yes')
else:
    print('No')
a = input()
b = 753
res = float("inf")
l = len(a)

for i in range(1,l-3):
    n = abs(b-int(a[i:i+3]))
    if res > n:
        res = n
        
print(n)    


### FIXED CODE ###

a = input()
b = 753
res = float("inf")
l = len(a)

for i in range(0,l-2):
    n = abs(b-int(a[i:i+3]))
    if res > n:
        res = n
        
print(int(res))
import sys
from collections import defaultdict


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)


def main():
    H, W, D = map(int, input().split())
    A = [list(map(int, input().split())) for _ in range(H)]
    M = defaultdict(list)
    for h in range(H):
        for w in range(W):
            M[A[h][w]] = [h, w]
    P = defaultdict(list)
    for d in range(1, D + 1):
        a = d
        while a <= H * W - D:
            p = abs(M[a][0] - M[a + D][0]) + abs(M[a][1] - M[a + D][1])
            if P[d]:
                P[d].append(P[d][-1] + p)
            else:
                P[d] = [0, p]
            a += D
    Q = int(input())
    for i in range(Q):
        L, R = map(int, input().split())
        d = L % D
        l = L // D
        r = R // D
        if d == 0:
            d = D
            print(P[d][r - 1] - P[d][l - 1])
        else:
            print(P[d][r] - P[d][l])


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
from collections import defaultdict


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)


def main():
    H, W, D = map(int, input().split())
    A = [list(map(int, input().split())) for _ in range(H)]
    M = defaultdict(list)
    for h in range(H):
        for w in range(W):
            M[A[h][w]] = [h, w]
    P = defaultdict(list)
    for d in range(1, D + 1):
        a = d
        while a <= H * W - D:
            p = abs(M[a][0] - M[a + D][0]) + abs(M[a][1] - M[a + D][1])
            if P[d]:
                P[d].append(P[d][-1] + p)
            else:
                P[d] = [0, p]
            a += D
    # print(P)
    Q = int(input())
    for i in range(Q):
        L, R = map(int, input().split())
        d = L % D
        l = L // D
        r = R // D
        if d == 0:
            d = D
            if len(P[d]) > 0:
                print(P[d][r - 1] - P[d][l - 1])
            else:
                print(0)
        else:
            if len(P[d])>0:
                print(P[d][r] - P[d][l])
            else:
                print(0)


if __name__ == "__main__":
    main()
n = int(input())
mod = 10**18
li = list(map(int, input().split())).sort()
ans = 1
for i in range(n):
    ans = ans * li[i]
    if ans > mod:
        ans = -1
        break
print(ans)


### FIXED CODE ###

n = int(input())
mod = 10**18
li = list(map(int, input().split()))
li.sort()
ans = 1
for i in range(n):
    ans *= li[i]
    if ans > mod:
        ans = -1
        break
print(ans)
f=lambda:map(int,input().split())
h,w,n=f()
c=[(h-2)*(w-2),*[0]*9]
d={}
while n:
 n-=1;x,y=f()
 for i in range(9):
  a=(x+i%3,y+i//3)
  if h>=x+i%3>2<y+i//3<=w:d[a]=d.get(a,0)+1;c[d[a]-1]-=1;c[d[a]]+=1
print(*c)

### FIXED CODE ###

f=lambda:map(int,input().split())
h,w,n=f()
c=[0]*10
c[0]=(h-2)*(w-2)
d={}
while n:
 n-=1;x,y=f()
 for i in range(9):
  a=(x+i%3,y+i//3)
  if h>=x+i%3>2<y+i//3<=w:d[a]=d.get(a,0)+1;c[d[a]-1]-=1;c[d[a]]+=1
print(*c)
from operator import mul
from functools import reduce


mod = 10 ** 9 + 7
N = 10 ** 6

fac = [0] * N
finv = [0] * N
inv = [0] * N

fac[0] = fac[1] = 1
finv[0] = finv[1] = 1
inv[1] = 1
for i in range(2, N):
    fac[i] = fac[i - 1] * i % mod
    # mod pにおける1, 2, ..., nの逆元
    inv[i] = mod - inv[mod % i] * (mod // i) % mod
    finv[i] = finv[i - 1] * inv[i] % mod


def com(n, k):
    global fac, finv, mod
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod


r1, c1, r2, c2 = map(int, input().split())
answer = 0

for r in range(r1, r2 + 1):
    for c in range(c1, c2 + 1):
        answer += com(r + c, c)
print(answer % mod)


### FIXED CODE ###

mod = 10 ** 9 + 7
N = 2 * 10 ** 6 + 10

fac = [0] * N
finv = [0] * N
inv = [0] * N

fac[0] = fac[1] = 1
finv[0] = finv[1] = 1
inv[1] = 1
for i in range(2, N):
    fac[i] = fac[i - 1] * i % mod
    # mod pにおける1, 2, ..., nの逆元
    inv[i] = mod - inv[mod % i] * (mod // i) % mod
    finv[i] = finv[i - 1] * inv[i] % mod


def com(n, k):
    global fac, finv, mod
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod

def g(r, c):
    return (com(r + c + 2, r + 1) - 1) % mod

r1, c1, r2, c2 = map(int, input().split())

answer = g(r2, c2) - g(r2, c1 - 1) - g(r1 - 1, c2) + g(r1 - 1, c1 - 1)
answer %= mod
print(answer)
a,b,c,d=map(int,input().split())
if A <= X <= A + B:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

A, B, X=map(int,input().split())
if A <= X <= A + B:
  print('YES')
else:
  print('NO')
N = int(input()) 
for i in range(N) :
   a,b,c = map(int,input().split(" "))
   p = [a,b,c]
   p.sort()
   if pow(p[0],2)+pow(p[1],2)==pow[p[2],2]:
     print("YES")
   else
     print("NO")


### FIXED CODE ###

n=int(input())
for i in range(n):
    a,b,c = input().split()
    x = int(a)
    y = int(b)
    z = int(c)
    p = [x,y,z]
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')
N=int(input())
P=list(map(int,input().split()))
b=[]
a=0
for i in range(N):
  if P[i]<=b:
    b=P[i]
    a+=1
print(a)
    


### FIXED CODE ###

N=int(input())
P=list(map(int,input().split()))
b=N
a=0
for i in range(N):
  if P[i]<=b:
    b=P[i]
    a+=1
print(a)
N = int(input())
A = list(map(int, input().split()))
dict1 = {}
for i in range(N):
  if A[i] not in dict1.keys():
    dict1[A[i]] = 0
  else:
    dict1[A[i]] += 1
value1 = []
for value in dict1.values():
  value1.append(value)
value2 = sorted(value1, reverse = True)
if value2[0] - value2[1] >= sum(value2[1:]):
  print(N - (value2[0] * 2))
else:
  if(sum(value2[0:]) % 2 == 0):
    print(len(value2))
  else:
    if len(value2) != 1:
      print(len(value2) - 1)
    else:
      print(1)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
dict1 = {}
for i in range(N):
  if A[i] not in dict1.keys():
    dict1[A[i]] = 0
  else:
    dict1[A[i]] += 1
value1 = []
for value in dict1.values():
  value1.append(value)
value2 = sorted(value1, reverse = True)
if len(value2) != 1:
  if value2[0] - value2[1] >= sum(value2[1:]):
    print(N - (value2[0] * 2))
  else:
    if(sum(value2[0:]) % 2 == 0):
      print(len(value2))
    else:
      print(len(value2) - 1)
else:
  print(1)
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
  exit()
if a<4:
  rb += r[a]
if b<4:
  ra += r[b]

print(ra)

### FIXED CODE ###

a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
else:
    if a<4:
      ra += r[a-1]
    if b<4:
      ra += r[b-1]
    print(ra)
n,k = map(int,input().split())

h = [int(x) for x in input().split()]
cnt=0
for i in n:
    if h[i] < k:
        cnt+=1
print(cnt)


### FIXED CODE ###


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

h = [int(x) for x in input().split()]
cnt=0
for i in range(n):
    if h[i] >= k:
        cnt+=1
print(cnt)
L, R = list(map(int,input().split(" ")))
l = L % 2019
r = R % 2019

array = sorted(list(range(l,r+1)))

ans = array[0]*array[1]
print(ans)

### FIXED CODE ###

L, R = list(map(int,input().split(" ")))
l = L % 2019
r = R % 2019

ans = 2019

if R - L >= 2018 or L > R:
    print("0")
else:
    array = list(range(l,r+1))
    for i in array:
        for j in array:
            if i == j:
                continue
            temp = i * j % 2019
            if ans > temp:
                ans = temp
    print(ans)
N = int(input())
S = input()

pares = S[:]

counter = 0
pares_num = []
for s in pares:
    if s == '(':
        counter += 1
        pares_num.append(counter)
    else:
        counter -= 1
        pares_num.append(counter)
        
min_num = min(pares_num)
if min_num < 0:
    pares = '(' * (-1*min_num) + pares
    

counter = 0
pares_num = []
for s in pares:
    if s == '(':
        counter += 1
        pares_num.append(counter)
    else:
        counter -= 1
        pares_num.append(counter)
#print(pares)
#print(pares_num)

zeros = [i for i, x in enumerate(pares_num) if x == 0]
max_num = max(pares_num[zeros[-1]:])
pares += ')' * max_num

print(pares)

### FIXED CODE ###

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

pares = S[:]

counter = 0
pares_num = []
for s in pares:
    if s == '(':
        counter += 1
        pares_num.append(counter)
    else:
        counter -= 1
        pares_num.append(counter)
        
min_num = min(pares_num)
if min_num < 0:
    pares = '(' * (-1*min_num) + pares
    

counter = 0
pares_num = []
for s in pares:
    if s == '(':
        counter += 1
        pares_num.append(counter)
    else:
        counter -= 1
        pares_num.append(counter)
#print(pares)
#print(pares_num)

pares += ')' * pares_num[-1]


print(pares)
n=int(input())
if n==1:
    print("Hello World")
else:
    a,b=map(int, input().split())
    print(a+b)


### FIXED CODE ###

n, *t = map(int, open(0))
if n == 1:
    print("Hello World")
else:
    print(sum(t))
n,m=map(int,input().split())
a=list(map(int,input().split()))
sumA=sum(a)
cnt=0
for i in a:
    if i>=sum/(4*m):
        cnt=cnt+1
if cnt>=m:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n,m=map(int,input().split())
a=list(map(int,input().split()))
sumA=sum(a)
cnt=0
for i in a:
    if i>=sumA/(4*m):
        cnt=cnt+1
    else:
        cnt=cnt
if cnt>=m:
    print('Yes')
else:
    print('No')
A = input()
B = input()
for i in range(len(A)):
　　if A == B:
　　　　print("Yes")
　　　　exit()
　　A = (A+A[0])[1:]
print("No")


### FIXED CODE ###

A = input()
B = input()
for i in range(len(A)):
    if A == B:
        print("Yes")
        exit()
    A = (A+A[0])[1:]
print("No")
import sys
N=int(input())
if N>10**5 or N<2:
    sys.exit(1)
s=1
for i in range(N):
    a=input().rstrip()
    s*=int(a)
if s<10e+18:
    print(s)
else:
    print("-1")

### FIXED CODE ###

import sys
N=int(input())
a=list(map(int, input().split()))
s=1
# aに0がある場合を省く
if 0 in a:
    print(0)
    sys.exit()
else:
# sが10^18になったら打ち切る
    for i in a:
        if s<10**18:
            s*=i
    if s>10**18:
        print(-1)
        sys.exit()
    print(s)
N = int(input())
if N%2 == 0:
  print(N)
else:
  print(2N)

### FIXED CODE ###

N = int(input())
if N%2 == 0:
  print(N)
else:
  print(2*N)