Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

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

a = []

for i in range(m):

  a.append(int(eval(input())))

ans = 0

flag = 0

a = set(a)

#フィボナッチ数列の初期値を調節

dp = [0] * (n+1)

dp[0] = 1

if 1 in a:

  dp[1] = 0

else:

  dp[1] = 1

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

  if dp[i-2] == 0 and dp[i-1] == 0:

    ans = 0

    flag = 1

    break

  elif i in a:

    continue

  else:

    dp[i] = dp[i-1] + dp[i-2]

if flag == 0:

  ans = dp[n]

print((ans%(10**9+7)))

# optimized version of the same code:

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

a = []

for i in range(m):

  a.append(int(eval(input())))

ans = 0

flag = 0

a = set(a)

#フィボナッチ数列の初期値を調節

dp = [0] * (n+1)

dp[0] = 1

if 1 in a:

  dp[1] = 0

else:

  dp[1] = 1

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

  if dp[i-2] == 0 and dp[i-1] == 0:

    ans = 0

    flag = 1

    break

  elif i in a:

    continue

  else:

    dp[i] = dp[i-1] + dp[i-2]

    dp[i] = dp[i] % (10**9+7)

if flag == 0:

  ans = dp[n]

print(ans)

n, m = list(map(int, input().split()))
a = []
for i in range(m):
    a.append(int(eval(input())))
ans = 0
flag = 0
a = set(a)
# フィボナッチ数列の初期値を調節
dp = [0] * (n + 1)
dp[0] = 1
if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1
for i in range(2, n + 1):
    if dp[i - 2] == 0 and dp[i - 1] == 0:
        ans = 0
        flag = 1
        break
    elif i in a:
        continue
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
if flag == 0:
    ans = dp[n]
print((ans % (10**9 + 7)))

n, m = list(map(int, input().split()))
a = []
for i in range(m):
    a.append(int(eval(input())))
ans = 0
flag = 0
a = set(a)
# フィボナッチ数列の初期値を調節
dp = [0] * (n + 1)
dp[0] = 1
if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1
for i in range(2, n + 1):
    if dp[i - 2] == 0 and dp[i - 1] == 0:
        ans = 0
        flag = 1
        break
    elif i in a:
        continue
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
        dp[i] = dp[i] % (10**9 + 7)
if flag == 0:
    ans = dp[n]
print(ans)


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import numpy as np

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

p = np.array(list(map(int, input().split())))

s = np.cumsum(p)

# print(p, s)

m = []

def partsum(s, x):

    global K

    if x == K - 1:

        return s[x]

    return s[x] - s[x - K]

for i in range(K - 1, N):

    m.append(partsum(s, i))

# print(m)

idx = m.index(max(m))

# print(idx)

ans = 0

for j in range(idx, idx + K):

    ans += (p[j] + 1) / 2

print(ans)

# optimized version of the same code:

from collections import deque

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

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

mx = 0

s = 0

q = deque()

for i in range(N):

    p[i] += 1

for i in range(N):

    s += p[i]

    q.append(p[i])

    if len(q) > K:

        s -= q.popleft()

    if len(q) == K:

        mx = max(mx, s)

print((mx / 2))

-p = np.array(list(map(int, input().split())))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import numpy as np

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

like_total = np.zeros(M)

cnt = 0

for _ in range(N):

    l = [v for v in map(int, input().split())]

    #print(l)

    for i in range(1, l[0]+1, 1):

        like_total[l[i]-1] += 1

#print(like_total, N)

#print(like_total[4], like_total[9], like_total[-1])

ans = len(np.where(like_total==N)[0])

print(ans)

# optimized version of the same code:

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

like_total = [0]*M

cnt = 0

for _ in range(N):

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

    for i in range(1, l[0]+1, 1):

        like_total[l[i]-1] += 1

for v in like_total:

    cnt += v==N

print(cnt)

import numpy as np

N, M = list(map(int, input().split()))
like_total = np.zeros(M)
cnt = 0
for _ in range(N):
    l = [v for v in map(int, input().split())]
    # print(l)
    for i in range(1, l[0] + 1, 1):
        like_total[l[i] - 1] += 1
# print(like_total, N)
# print(like_total[4], like_total[9], like_total[-1])
ans = len(np.where(like_total == N)[0])
print(ans)

N, M = list(map(int, input().split()))
like_total = [0] * M
cnt = 0
for _ in range(N):
    l = list(map(int, input().split()))
    for i in range(1, l[0] + 1, 1):
        like_total[l[i] - 1] += 1
for v in like_total:
    cnt += v == N
print(cnt)

-    l = [v for v in map(int, input().split())]

+    l = list(map(int, input().split()))

-# print(like_total[4], like_total[9], like_total[-1])

-ans = len(np.where(like_total == N)[0])


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import sys

import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())

rl = lambda: list(map(int, stdin.readline().split()))

rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

S = list(rs())

W = [0] * len(S)

for i in range(len(S)):

    if S[i] == 'W':

        W[i] = 1

W = np.array(W[::-1])

W_cum = W.cumsum()[::-1]

W_cum = W_cum.tolist()

answer = 0

for i in range(len(S)):

    if S[i] == 'B':

        answer += W_cum[i]

print(answer)

# optimized version of the same code:

import sys

import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())

rl = lambda: list(map(int, stdin.readline().split()))

rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

S = list(rs())

cnt_B = 0

answer = 0

for s in S:

    if s == 'B':

        cnt_B += 1

    else:

        answer += cnt_B

print(answer)

import sys
import numpy as np

stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces
S = list(rs())
W = [0] * len(S)
for i in range(len(S)):
    if S[i] == "W":
        W[i] = 1
W = np.array(W[::-1])
W_cum = W.cumsum()[::-1]
W_cum = W_cum.tolist()
answer = 0
for i in range(len(S)):
    if S[i] == "B":
        answer += W_cum[i]
print(answer)

import sys
import numpy as np

stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces
S = list(rs())
cnt_B = 0
answer = 0
for s in S:
    if s == "B":
        cnt_B += 1
    else:
        answer += cnt_B
print(answer)

-W = [0] * len(S)
-for i in range(len(S)):
-    if S[i] == "W":
-        W[i] = 1
-W = np.array(W[::-1])
-W_cum = W.cumsum()[::-1]
-W_cum = W_cum.tolist()
+cnt_B = 0
-for i in range(len(S)):
-    if S[i] == "B":
-        answer += W_cum[i]
+for s in S:
+    if s == "B":
+        cnt_B += 1
+    else:
+        answer += cnt_B


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import numpy as np

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

A=np.zeros((N+1,M+1))

A[0]=np.ones(M+1)

for i in range(1,N+1):

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

    for m in range(1,B[0]+1):

        A[i][B[m]]=A[i-1][B[m]]

a=sum(A[N])

print((int(a)))

# optimized version of the same code:

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

A = [[1 for _ in range(M)]]+[[0 for _ in range(M)] for _ in range(N)]

for i in range(1,N+1):

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

    Ai=B[1:]

    for m in Ai:

        A[i][m-1]=A[i-1][m-1]

a=sum(A[N])

print((int(a)))

import numpy as np

N, M = list(map(int, input().split()))
A = np.zeros((N + 1, M + 1))
A[0] = np.ones(M + 1)
for i in range(1, N + 1):
    B = list(map(int, input().split()))
    for m in range(1, B[0] + 1):
        A[i][B[m]] = A[i - 1][B[m]]
a = sum(A[N])
print((int(a)))

N, M = list(map(int, input().split()))
A = [[1 for _ in range(M)]] + [[0 for _ in range(M)] for _ in range(N)]
for i in range(1, N + 1):
    B = list(map(int, input().split()))
    Ai = B[1:]
    for m in Ai:
        A[i][m - 1] = A[i - 1][m - 1]
a = sum(A[N])
print((int(a)))

+A = [[1 for _ in range(M)]] + [[0 for _ in range(M)] for _ in range(N)]


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import numpy as np

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

B = np.ones(M,dtype=np.int)

for _ in range(N):

    A = np.array(list(map(int,input().split())))[1:]

    for i in range(M):

        if not i+1 in A:

            B[i] = 0

print((B.sum()))

# optimized version of the same code:

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

r = int(-1)

for i in range(N):

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

  A.pop(0)

  c = 0

  for a in A:

    c |= (1 << (a-1))

  r &= c

ans = sum([(r>>n)&1 for n in range(M)])

print(ans)

import numpy as np

(N, M) = list(map(int, input().split()))
B = np.ones(M, dtype=np.int)
for _ in range(N):
    A = np.array(list(map(int, input().split())))[1:]
    for i in range(M):
        if not i + 1 in A:
            B[i] = 0
print((B.sum()))

(N, M) = list(map(int, input().split()))
r = int(-1)
for i in range(N):
    A = list(map(int, input().split()))
    A.pop(0)
    c = 0
    for a in A:
        c |= 1 << (a - 1)
    r &= c
ans = sum([(r >> n) & 1 for n in range(M)])
print(ans)

-    A = np.array(list(map(int, input().split())))[1:]

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

+ans = sum([(r >> n) & 1 for n in range(M)])


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

from heapq import heappush, heappop

k = int(eval(input()))

heap = [(1,1)]

dist = [float("inf")]*k

while heap:

    cost, cur = heappop(heap)

    if dist[cur] <= cost:

        continue

    dist[cur] = cost

    # +1

    nxt = (cur+1)%k

    heappush(heap, (cost+1, nxt))

    # *10

    nxt = cur*10 % k

    heappush(heap, (cost, nxt))

print((dist[0]))

# optimized version of the same code:

from collections import deque

k = int(eval(input()))

que = deque()

que.append((1,1))

dist = [float("inf")]*k

while que:

    cost, cur = que.popleft()

    if dist[cur] <= cost:

        continue

    dist[cur] = cost

    # +1

    nxt = (cur+1)%k

    que.append((cost+1,nxt))

    # *10

    nxt = cur*10 % k

    que.appendleft((cost, nxt))

print((dist[0]))

from heapq import heappush, heappop

k = int(eval(input()))
heap = [(1, 1)]
dist = [float("inf")] * k
while heap:
    cost, cur = heappop(heap)
    if dist[cur] <= cost:
        continue
    dist[cur] = cost
    # +1
    nxt = (cur + 1) % k
    heappush(heap, (cost + 1, nxt))
    # *10
    nxt = cur * 10 % k
    heappush(heap, (cost, nxt))
print((dist[0]))

from collections import deque

k = int(eval(input()))
que = deque()
que.append((1, 1))
dist = [float("inf")] * k
while que:
    cost, cur = que.popleft()
    if dist[cur] <= cost:
        continue
    dist[cur] = cost
    # +1
    nxt = (cur + 1) % k
    que.append((cost + 1, nxt))
    # *10
    nxt = cur * 10 % k
    que.appendleft((cost, nxt))
print((dist[0]))

-from heapq import heappush, heappop
+from collections import deque
-heap = [(1, 1)]
+que = deque()
+que.append((1, 1))
-while heap:
-    cost, cur = heappop(heap)
+while que:
+    cost, cur = que.popleft()
-    heappush(heap, (cost + 1, nxt))
+    que.append((cost + 1, nxt))
-    heappush(heap, (cost, nxt))
+    que.appendleft((cost, nxt))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

# coding: utf-8

def solve(*args: str) -> str:

    x = int(args[0])

    ret = None

    for a in range(120):

        for b in range(120):

            a5, b5 = pow(a, 5), pow(b, 5)

            if a5-b5 == x:

                ret = (a, b)

            elif a5+b5 == x:

                ret = (a, -b)

    return ' '.join(map(str, ret))

if __name__ == "__main__":

    print((solve(*(open(0).read().splitlines()))))

# optimized version of the same code:

# coding: utf-8

def solve(*args: str) -> str:

    x = int(args[0])

    ret = None

    for b in range(120):

        for a in range(b, 120):

            a5, b5 = pow(a, 5), pow(b, 5)

            if a5-b5 == x:

                ret = (a, b)

            elif a5+b5 == x:

                ret = (a, -b)

    return ' '.join(map(str, ret))

if __name__ == "__main__":

    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8
def solve(*args: str) -> str:
    x = int(args[0])
    ret = None
    for a in range(120):
        for b in range(120):
            a5, b5 = pow(a, 5), pow(b, 5)
            if a5 - b5 == x:
                ret = (a, b)
            elif a5 + b5 == x:
                ret = (a, -b)
    return " ".join(map(str, ret))

if __name__ == "__main__":
    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8
def solve(*args: str) -> str:
    x = int(args[0])
    ret = None
    for b in range(120):
        for a in range(b, 120):
            a5, b5 = pow(a, 5), pow(b, 5)
            if a5 - b5 == x:
                ret = (a, b)
            elif a5 + b5 == x:
                ret = (a, -b)
    return " ".join(map(str, ret))

if __name__ == "__main__":
    print((solve(*(open(0).read().splitlines()))))

-    for a in range(120):
-        for b in range(120):
+    for b in range(120):
+        for a in range(b, 120):


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

S = eval(input())

T = eval(input())

l = len(S)

res = 0

for n in range(l):

    if S[n] == T[n]:

        res += 1

print(res)

# optimized version of the same code:

S = eval(input())

T = eval(input())

l = len(S)

ans = 0

for n in range(l):

    if S[n] == T[n]:

        ans += 1

print(ans)

-res = 0
+ans = 0
-        res += 1
-print(res)
+        ans += 1
+print(ans)


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

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

max_iter = max(X, Y) * 2

ans = float("inf")

for i in range(max_iter):

    a = max(X - i, 0)

    b = max(Y - i, 0)

    price = 2*C * i + A * a + B * b

    ans = min(ans, price)

print(ans)

# optimized version of the same code:

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

ans = float("inf")

for i in range(max(X, Y)+1):

    x = max(X - i, 0)

    y = max(Y - i, 0)

    cost = 2*C * i + A * x + B * y

    ans = min(ans, cost)

print(ans)

A, B, C, X, Y = list(map(int, input().split()))
max_iter = max(X, Y) * 2
ans = float("inf")
for i in range(max_iter):
    a = max(X - i, 0)
    b = max(Y - i, 0)
    price = 2 * C * i + A * a + B * b
    ans = min(ans, price)
print(ans)

A, B, C, X, Y = list(map(int, input().split()))
ans = float("inf")
for i in range(max(X, Y) + 1):
    x = max(X - i, 0)
    y = max(Y - i, 0)
    cost = 2 * C * i + A * x + B * y
    ans = min(ans, cost)
print(ans)

-max_iter = max(X, Y) * 2
-for i in range(max_iter):
-    a = max(X - i, 0)
-    b = max(Y - i, 0)
-    price = 2 * C * i + A * a + B * b
-    ans = min(ans, price)
+for i in range(max(X, Y) + 1):
+    x = max(X - i, 0)
+    y = max(Y - i, 0)
+    cost = 2 * C * i + A * x + B * y
+    ans = min(ans, cost)


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import numpy as np

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

exp=list([(int(x)+1)/2 for x in input().split()]) # 入力と同時に期待値計算

l=np.cumsum(exp) # 累積和の計算

ans=l[k-1]

for i in range(n-k):

    ans=max(ans,l[i+k]-l[i])

print(ans)

# optimized version of the same code:

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

exp=list([(int(x)+1)/2 for x in input().split()]) # 入力と同時に期待値計算

l=[0]*n

sum1=0

for i in range(n):# 累積和の計算

    sum1+=exp[i]

    l[i]=sum1

ans=l[k-1]

for i in range(n-k):

    ans=max(ans,l[i+k]-l[i])

print(ans)

import numpy as np

n, k = list(map(int, input().split()))
exp = list([(int(x) + 1) / 2 for x in input().split()])  # 入力と同時に期待値計算
l = np.cumsum(exp)  # 累積和の計算
ans = l[k - 1]
for i in range(n - k):
    ans = max(ans, l[i + k] - l[i])
print(ans)

n, k = list(map(int, input().split()))
exp = list([(int(x) + 1) / 2 for x in input().split()])  # 入力と同時に期待値計算
l = [0] * n
sum1 = 0
for i in range(n):  # 累積和の計算
    sum1 += exp[i]
    l[i] = sum1
ans = l[k - 1]
for i in range(n - k):
    ans = max(ans, l[i + k] - l[i])
print(ans)

-import numpy as np
-l = np.cumsum(exp)  # 累積和の計算
+l = [0] * n
+sum1 = 0
+for i in range(n):  # 累積和の計算
+    sum1 += exp[i]
+    l[i] = sum1


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import math

import statistics

n = int(eval(input()))

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

a = [aa-i-1 for i, aa in enumerate(a)]

answer = n*10**20

median_low = statistics.median_low(a)

median_high = statistics.median_high(a)

for m in (median_low,median_high):

  ans=0

  for aa in a:

    ans += abs(aa-m)

  answer = min(ans,answer)

print(answer)

# optimized version of the same code:

#!/usr/bin/env python3

import sys

def solve(N: int, A: "List[int]"):

    difA = [0]*N

    for i in range(N):

        difA[i] = A[i]-(i+1)

    difA.sort()

    if N%2 == 0:

        g1 = difA[N//2]

        g2 = difA[N//2-1]

        a1 = 0

        a2 = 0

        for i in range(N):

            a1 += abs(difA[i]-g1)

            a2 += abs(difA[i]-g2)

        print((min(a1,a2)))

    else:

        g = difA[N//2]

        a = 0

        for i in range(N):

            a += abs(difA[i]-g)

        print(a)

    return

def main():

    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    N = int(next(tokens))  # type: int

    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"

    solve(N, A)

if __name__ == '__main__':

    main()

import math
import statistics

n = int(eval(input()))
a = list(map(int, input().split()))
a = [aa - i - 1 for i, aa in enumerate(a)]
answer = n * 10**20
median_low = statistics.median_low(a)
median_high = statistics.median_high(a)
for m in (median_low, median_high):
    ans = 0
    for aa in a:
        ans += abs(aa - m)
    answer = min(ans, answer)
print(answer)

#!/usr/bin/env python3
import sys

def solve(N: int, A: "List[int]"):
    difA = [0] * N
    for i in range(N):
        difA[i] = A[i] - (i + 1)
    difA.sort()
    if N % 2 == 0:
        g1 = difA[N // 2]
        g2 = difA[N // 2 - 1]
        a1 = 0
        a2 = 0
        for i in range(N):
            a1 += abs(difA[i] - g1)
            a2 += abs(difA[i] - g2)
        print((min(a1, a2)))
    else:
        g = difA[N // 2]
        a = 0
        for i in range(N):
            a += abs(difA[i] - g)
        print(a)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == "__main__":
    main()

-a = [aa - i - 1 for i, aa in enumerate(a)]

+    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

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

"""

Created on Sat Apr 25 18:20:35 2020

"""

import sys

import numpy as np

sys.setrecursionlimit(10 ** 9)

def input():

    return sys.stdin.readline()[:-1]

mod = 10**9+7

#N = int(input())

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

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

#N, K, *A = map(int, open(0).read().split())

dp = [True for i in range(K + A[-1] + 1)]

for i in range(K):

    if dp[i]:

        for a in A:

            dp[i + a] = False

#    print(i, dp[i],A+i,dp[A+i])

#print(dp)

if dp[K]:

    ans = 'Second'

else:

    ans = 'First'

print(ans)

# optimized version of the same code:

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

"""

Created on Sat Apr 25 18:20:35 2020

"""

import sys

import numpy as np

sys.setrecursionlimit(10 ** 9)

#def input():

#    return sys.stdin.readline()[:-1]

mod = 10**9+7

#N = int(input())

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

#A = np.array(list(map(int,input().split())))

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

dp = [True for i in range(K + A[-1] + 1)]

for i in range(K):

    if dp[i]:

        for a in A:

            dp[i + a] = False

#    print(i, dp[i],A+i,dp[A+i])

#print(dp)

if dp[K]:

    ans = 'Second'

else:

    ans = 'First'

print(ans)

# -*- coding: utf-8 -*-
"""
Created on Sat Apr 25 18:20:35 2020
"""
import sys
import numpy as np

sys.setrecursionlimit(10**9)

def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7
# N = int(input())
N, K = list(map(int, input().split()))
A = np.array(list(map(int, input().split())))
# N, K, *A = map(int, open(0).read().split())
dp = [True for i in range(K + A[-1] + 1)]
for i in range(K):
    if dp[i]:
        for a in A:
            dp[i + a] = False
#    print(i, dp[i],A+i,dp[A+i])
# print(dp)
if dp[K]:
    ans = "Second"
else:
    ans = "First"
print(ans)

# -*- coding: utf-8 -*-
"""
Created on Sat Apr 25 18:20:35 2020
"""
import sys
import numpy as np

sys.setrecursionlimit(10**9)
# def input():
#    return sys.stdin.readline()[:-1]
mod = 10**9 + 7
# N = int(input())
N, K = list(map(int, input().split()))
# A = np.array(list(map(int,input().split())))
A = list(map(int, input().split()))
dp = [True for i in range(K + A[-1] + 1)]
for i in range(K):
    if dp[i]:
        for a in A:
            dp[i + a] = False
#    print(i, dp[i],A+i,dp[A+i])
# print(dp)
if dp[K]:
    ans = "Second"
else:
    ans = "First"
print(ans)

-A = np.array(list(map(int, input().split())))

-# N, K, *A = map(int, open(0).read().split())

+# A = np.array(list(map(int,input().split())))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

def main():

    from itertools import product

    N = int(eval(input()))

    g = []

    for _ in range(N):

        a = int(eval(input()))

        t = []

        for _ in range(a):

            x, y = list(map(int, input().split()))

            x -= 1

            t.append((x, y))

        g.append(t)

    def is_ok(prd):

        for j, bl in enumerate(prd):

            if bl:

                for x, y in g[j]:

                    if prd[x] != y:

                        return False

        return True

    ans = 0

    for prd in product([0, 1], repeat=N):

        *prd, = prd  # list化

        if is_ok(prd):

            ans = max(ans, prd.count(1))

    print(ans)

if __name__ == '__main__':

    main()

# bit演算しようとしてはまった

# optimized version of the same code:

def main():

    from itertools import product

    N = int(eval(input()))

    g = []

    for _ in range(N):

        a = int(eval(input()))

        t = []

        for _ in range(a):

            x, y = list(map(int, input().split()))

            t.append((x - 1, y))

        g.append(t)

    def is_ok(prd):

        for j, bl in enumerate(prd):

            if bl:

                for x, y in g[j]:

                    if prd[x] != y:

                        return False

        return True

    ans = 0

    for prd in product([0, 1], repeat=N):

        if is_ok(prd):

            ans = max(ans, prd.count(1))

    print(ans)

if __name__ == '__main__':

    main()

# bit演算しようとしてはまった

def main():
    from itertools import product

    N = int(eval(input()))
    g = []
    for _ in range(N):
        a = int(eval(input()))
        t = []
        for _ in range(a):
            x, y = list(map(int, input().split()))
            x -= 1
            t.append((x, y))
        g.append(t)

    def is_ok(prd):
        for j, bl in enumerate(prd):
            if bl:
                for x, y in g[j]:
                    if prd[x] != y:
                        return False
        return True

    ans = 0
    for prd in product([0, 1], repeat=N):
        (*prd,) = prd  # list化
        if is_ok(prd):
            ans = max(ans, prd.count(1))
    print(ans)

if __name__ == "__main__":
    main()
# bit演算しようとしてはまった

def main():
    from itertools import product

    N = int(eval(input()))
    g = []
    for _ in range(N):
        a = int(eval(input()))
        t = []
        for _ in range(a):
            x, y = list(map(int, input().split()))
            t.append((x - 1, y))
        g.append(t)

    def is_ok(prd):
        for j, bl in enumerate(prd):
            if bl:
                for x, y in g[j]:
                    if prd[x] != y:
                        return False
        return True

    ans = 0
    for prd in product([0, 1], repeat=N):
        if is_ok(prd):
            ans = max(ans, prd.count(1))
    print(ans)

if __name__ == "__main__":
    main()
# bit演算しようとしてはまった

-            x -= 1
-            t.append((x, y))
+            t.append((x - 1, y))
-        (*prd,) = prd  # list化


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

a,b,c,x,y = list(map(int,input().split()))

ans = a*x + b*y

for i in range(max(x,y) + 1):

	money = max(0,(x-i)*a) + max(0,(y-i)*b) + 2*i*c

	if money <= ans:

		ans = money

print(ans)

# optimized version of the same code:

a,b,c,x,y = list(map(int,input().split()))

if a + b >= 2*c:

	if x >= y:

		ans = 2*y*c + (x-y)*min(a,2*c)

	else:

		ans = 2*x*c + (y-x)*min(b,2*c)

else:

	ans = (x*a + y*b)

print(ans)

a, b, c, x, y = list(map(int, input().split()))
ans = a * x + b * y
for i in range(max(x, y) + 1):
    money = max(0, (x - i) * a) + max(0, (y - i) * b) + 2 * i * c
    if money <= ans:
        ans = money
print(ans)

a, b, c, x, y = list(map(int, input().split()))
if a + b >= 2 * c:
    if x >= y:
        ans = 2 * y * c + (x - y) * min(a, 2 * c)
    else:
        ans = 2 * x * c + (y - x) * min(b, 2 * c)
else:
    ans = x * a + y * b
print(ans)


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import sys

# from itertools import chain, accumulate

n, m, *abcdef = list(map(int, sys.stdin.buffer.read().split()))

ver_lines = []

hor_lines = []

x_list = set()

y_list = set()

n3 = n * 3

for a, b, c in zip(abcdef[0:n3:3], abcdef[1:n3:3], abcdef[2:n3:3]):

    y_list.add(a)

    y_list.add(b)

    x_list.add(c)

    ver_lines.append((a, b, c))

for d, e, f in zip(abcdef[n3 + 0::3], abcdef[n3 + 1::3], abcdef[n3 + 2::3]):

    y_list.add(d)

    x_list.add(e)

    x_list.add(f)

    hor_lines.append((d, e, f))

x_list.add(0)

y_list.add(0)

x_list = sorted(x_list)

y_list = sorted(y_list)

x_dict = {x: i for i, x in enumerate(x_list, start=1)}

y_dict = {y: i for i, y in enumerate(y_list, start=1)}

row_real = len(x_list)

col_real = len(y_list)

row = row_real + 2

col = col_real + 2

banned_up_ij = [[0] * row for _ in range(col)]

banned_down_ij = [[0] * row for _ in range(col)]

banned_left_ij = [[0] * col for _ in range(row)]

banned_right_ij = [[0] * col for _ in range(row)]

for a, b, c in ver_lines:

    if a > b:

        a, b = b, a

    ai = y_dict[a]

    bi = y_dict[b]

    j = x_dict[c]

    banned_left_ij[j][ai] += 1

    banned_left_ij[j][bi] -= 1

    banned_right_ij[j - 1][ai] += 1

    banned_right_ij[j - 1][bi] -= 1

for d, e, f in hor_lines:

    if e > f:

        e, f = f, e

    i = y_dict[d]

    ej = x_dict[e]

    fj = x_dict[f]

    banned_up_ij[i][ej] += 1

    banned_up_ij[i][fj] -= 1

    banned_down_ij[i - 1][ej] += 1

    banned_down_ij[i - 1][fj] -= 1

banned_up = [0] * (row * col)

banned_down = [0] * (row * col)

banned_left = [0] * (row * col)

banned_right = [0] * (row * col)

for i in range(col):

    ru = banned_up_ij[i]

    rd = banned_down_ij[i]

    ri = row * i

    banned_up[ri] = ru[0]

    banned_down[ri] = rd[0]

    for j in range(1, row):

        banned_up[ri + j] = banned_up[ri + j - 1] + ru[j]

        banned_down[ri + j] = banned_down[ri + j - 1] + rd[j]

for j in range(row):

    rl = banned_left_ij[j]

    rr = banned_right_ij[j]

    banned_left[j] = rl[0]

    banned_right[j] = rr[0]

    for i in range(1, col):

        ri0 = (i - 1) * row

        ri1 = i * row

        banned_left[ri1 + j] = banned_left[ri0 + j] + rl[i]

        banned_right[ri1 + j] = banned_right[ri0 + j] + rr[i]

# banned_up = list(chain.from_iterable(map(accumulate, banned_up_ij)))

# banned_down = list(chain.from_iterable(map(accumulate, banned_down_ij)))

# banned_left = list(chain.from_iterable(zip(*map(accumulate, banned_left_ij))))

# banned_right = list(chain.from_iterable(zip(*map(accumulate, banned_right_ij))))

# for i in range(col):

#     print(walls[i * row:(i + 1) * row])

s = row * y_dict[0] + x_dict[0]

enable = [-1] * row + ([-1] + [0] * (row - 2) + [-1]) * (col - 2) + [-1] * row

# for i in range(col):

#     print(enable[i * row:(i + 1) * row])

q = [s]

moves = [(-row, banned_up), (-1, banned_left), (1, banned_right), (row, banned_down)]

while q:

    c = q.pop()

    if enable[c] == 1:

        continue

    elif enable[c] == -1:

        print('INF')

        exit()

    enable[c] = 1

    for dc, banned in moves:

        if banned[c]:

            continue

        nc = c + dc

        if enable[nc] == 1:

            continue

        q.append(nc)

# for i in range(col):

#     print(enable[i * row:(i + 1) * row])

ans = 0

for i in range(col):

    ri = i * row

    for j in range(row):

        if enable[ri + j] != 1:

            continue

        t = y_list[i - 1]

        b = y_list[i]

        l = x_list[j - 1]

        r = x_list[j]

        ans += (b - t) * (r - l)

print(ans)

# optimized version of the same code:

import sys

# from itertools import chain, accumulate

n, m, *abcdef = list(map(int, sys.stdin.buffer.read().split()))

ver_lines = []

hor_lines = []

x_list = set()

y_list = set()

n3 = n * 3

for a, b, c in zip(abcdef[0:n3:3], abcdef[1:n3:3], abcdef[2:n3:3]):

    y_list.add(a)

    y_list.add(b)

    x_list.add(c)

    ver_lines.append((a, b, c))

for d, e, f in zip(abcdef[n3 + 0::3], abcdef[n3 + 1::3], abcdef[n3 + 2::3]):

    y_list.add(d)

    x_list.add(e)

    x_list.add(f)

    hor_lines.append((d, e, f))

x_list.add(0)

y_list.add(0)

x_list = sorted(x_list)

y_list = sorted(y_list)

x_dict = {x: i for i, x in enumerate(x_list, start=1)}

y_dict = {y: i for i, y in enumerate(y_list, start=1)}

row_real = len(x_list)

col_real = len(y_list)

row = row_real + 2

col = col_real + 2

banned_up = [0] * (row * col)

banned_down = [0] * (row * col)

banned_left = [0] * (row * col)

banned_right = [0] * (row * col)

for a, b, c in ver_lines:

    if a > b:

        a, b = b, a

    ai = y_dict[a] * row

    bi = y_dict[b] * row

    j = x_dict[c]

    banned_left[ai + j] += 1

    banned_left[bi + j] -= 1

    banned_right[ai + j - 1] += 1

    banned_right[bi + j - 1] -= 1

for d, e, f in hor_lines:

    if e > f:

        e, f = f, e

    ri = y_dict[d] * row

    ej = x_dict[e]

    fj = x_dict[f]

    banned_up[ri + ej] += 1

    banned_up[ri + fj] -= 1

    banned_down[ri - row + ej] += 1

    banned_down[ri - row + fj] -= 1

for i in range(1, col):

    ri0 = row * (i - 1)

    ri1 = row * i

    for j in range(1, row):

        banned_up[ri1 + j] += banned_up[ri1 + j - 1]

        banned_down[ri1 + j] += banned_down[ri1 + j - 1]

        banned_left[ri1 + j] += banned_left[ri0 + j]

        banned_right[ri1 + j] += banned_right[ri0 + j]

# banned_up = list(chain.from_iterable(map(accumulate, banned_up_ij)))

# banned_down = list(chain.from_iterable(map(accumulate, banned_down_ij)))

# banned_left = list(chain.from_iterable(zip(*map(accumulate, banned_left_ij))))

# banned_right = list(chain.from_iterable(zip(*map(accumulate, banned_right_ij))))

# for i in range(col):

#     print(walls[i * row:(i + 1) * row])

s = row * y_dict[0] + x_dict[0]

enable = [-1] * row + ([-1] + [0] * (row - 2) + [-1]) * (col - 2) + [-1] * row

# for i in range(col):

#     print(enable[i * row:(i + 1) * row])

q = [s]

moves = [(-row, banned_up), (-1, banned_left), (1, banned_right), (row, banned_down)]

while q:

    c = q.pop()

    if enable[c] == 1:

        continue

    elif enable[c] == -1:

        print('INF')

        exit()

    enable[c] = 1

    for dc, banned in moves:

        if banned[c]:

            continue

        nc = c + dc

        if enable[nc] == 1:

            continue

        q.append(nc)

# for i in range(col):

#     print(enable[i * row:(i + 1) * row])

ans = 0

for i in range(col):

    ri = i * row

    for j in range(row):

        if enable[ri + j] != 1:

            continue

        t = y_list[i - 1]

        b = y_list[i]

        l = x_list[j - 1]

        r = x_list[j]

        ans += (b - t) * (r - l)

print(ans)

import sys

# from itertools import chain, accumulate
n, m, *abcdef = list(map(int, sys.stdin.buffer.read().split()))
ver_lines = []
hor_lines = []
x_list = set()
y_list = set()
n3 = n * 3
for a, b, c in zip(abcdef[0:n3:3], abcdef[1:n3:3], abcdef[2:n3:3]):
    y_list.add(a)
    y_list.add(b)
    x_list.add(c)
    ver_lines.append((a, b, c))
for d, e, f in zip(abcdef[n3 + 0 :: 3], abcdef[n3 + 1 :: 3], abcdef[n3 + 2 :: 3]):
    y_list.add(d)
    x_list.add(e)
    x_list.add(f)
    hor_lines.append((d, e, f))
x_list.add(0)
y_list.add(0)
x_list = sorted(x_list)
y_list = sorted(y_list)
x_dict = {x: i for i, x in enumerate(x_list, start=1)}
y_dict = {y: i for i, y in enumerate(y_list, start=1)}
row_real = len(x_list)
col_real = len(y_list)
row = row_real + 2
col = col_real + 2
banned_up_ij = [[0] * row for _ in range(col)]
banned_down_ij = [[0] * row for _ in range(col)]
banned_left_ij = [[0] * col for _ in range(row)]
banned_right_ij = [[0] * col for _ in range(row)]
for a, b, c in ver_lines:
    if a > b:
        a, b = b, a
    ai = y_dict[a]
    bi = y_dict[b]
    j = x_dict[c]
    banned_left_ij[j][ai] += 1
    banned_left_ij[j][bi] -= 1
    banned_right_ij[j - 1][ai] += 1
    banned_right_ij[j - 1][bi] -= 1
for d, e, f in hor_lines:
    if e > f:
        e, f = f, e
    i = y_dict[d]
    ej = x_dict[e]
    fj = x_dict[f]
    banned_up_ij[i][ej] += 1
    banned_up_ij[i][fj] -= 1
    banned_down_ij[i - 1][ej] += 1
    banned_down_ij[i - 1][fj] -= 1
banned_up = [0] * (row * col)
banned_down = [0] * (row * col)
banned_left = [0] * (row * col)
banned_right = [0] * (row * col)
for i in range(col):
    ru = banned_up_ij[i]
    rd = banned_down_ij[i]
    ri = row * i
    banned_up[ri] = ru[0]
    banned_down[ri] = rd[0]
    for j in range(1, row):
        banned_up[ri + j] = banned_up[ri + j - 1] + ru[j]
        banned_down[ri + j] = banned_down[ri + j - 1] + rd[j]
for j in range(row):
    rl = banned_left_ij[j]
    rr = banned_right_ij[j]
    banned_left[j] = rl[0]
    banned_right[j] = rr[0]
    for i in range(1, col):
        ri0 = (i - 1) * row
        ri1 = i * row
        banned_left[ri1 + j] = banned_left[ri0 + j] + rl[i]
        banned_right[ri1 + j] = banned_right[ri0 + j] + rr[i]
# banned_up = list(chain.from_iterable(map(accumulate, banned_up_ij)))
# banned_down = list(chain.from_iterable(map(accumulate, banned_down_ij)))
# banned_left = list(chain.from_iterable(zip(*map(accumulate, banned_left_ij))))
# banned_right = list(chain.from_iterable(zip(*map(accumulate, banned_right_ij))))
# for i in range(col):
#     print(walls[i * row:(i + 1) * row])
s = row * y_dict[0] + x_dict[0]
enable = [-1] * row + ([-1] + [0] * (row - 2) + [-1]) * (col - 2) + [-1] * row
# for i in range(col):
#     print(enable[i * row:(i + 1) * row])
q = [s]
moves = [(-row, banned_up), (-1, banned_left), (1, banned_right), (row, banned_down)]
while q:
    c = q.pop()
    if enable[c] == 1:
        continue
    elif enable[c] == -1:
        print("INF")
        exit()
    enable[c] = 1
    for dc, banned in moves:
        if banned[c]:
            continue
        nc = c + dc
        if enable[nc] == 1:
            continue
        q.append(nc)
# for i in range(col):
#     print(enable[i * row:(i + 1) * row])
ans = 0
for i in range(col):
    ri = i * row
    for j in range(row):
        if enable[ri + j] != 1:
            continue
        t = y_list[i - 1]
        b = y_list[i]
        l = x_list[j - 1]
        r = x_list[j]
        ans += (b - t) * (r - l)
print(ans)

import sys

# from itertools import chain, accumulate
n, m, *abcdef = list(map(int, sys.stdin.buffer.read().split()))
ver_lines = []
hor_lines = []
x_list = set()
y_list = set()
n3 = n * 3
for a, b, c in zip(abcdef[0:n3:3], abcdef[1:n3:3], abcdef[2:n3:3]):
    y_list.add(a)
    y_list.add(b)
    x_list.add(c)
    ver_lines.append((a, b, c))
for d, e, f in zip(abcdef[n3 + 0 :: 3], abcdef[n3 + 1 :: 3], abcdef[n3 + 2 :: 3]):
    y_list.add(d)
    x_list.add(e)
    x_list.add(f)
    hor_lines.append((d, e, f))
x_list.add(0)
y_list.add(0)
x_list = sorted(x_list)
y_list = sorted(y_list)
x_dict = {x: i for i, x in enumerate(x_list, start=1)}
y_dict = {y: i for i, y in enumerate(y_list, start=1)}
row_real = len(x_list)
col_real = len(y_list)
row = row_real + 2
col = col_real + 2
banned_up = [0] * (row * col)
banned_down = [0] * (row * col)
banned_left = [0] * (row * col)
banned_right = [0] * (row * col)
for a, b, c in ver_lines:
    if a > b:
        a, b = b, a
    ai = y_dict[a] * row
    bi = y_dict[b] * row
    j = x_dict[c]
    banned_left[ai + j] += 1
    banned_left[bi + j] -= 1
    banned_right[ai + j - 1] += 1
    banned_right[bi + j - 1] -= 1
for d, e, f in hor_lines:
    if e > f:
        e, f = f, e
    ri = y_dict[d] * row
    ej = x_dict[e]
    fj = x_dict[f]
    banned_up[ri + ej] += 1
    banned_up[ri + fj] -= 1
    banned_down[ri - row + ej] += 1
    banned_down[ri - row + fj] -= 1
for i in range(1, col):
    ri0 = row * (i - 1)
    ri1 = row * i
    for j in range(1, row):
        banned_up[ri1 + j] += banned_up[ri1 + j - 1]
        banned_down[ri1 + j] += banned_down[ri1 + j - 1]
        banned_left[ri1 + j] += banned_left[ri0 + j]
        banned_right[ri1 + j] += banned_right[ri0 + j]
# banned_up = list(chain.from_iterable(map(accumulate, banned_up_ij)))
# banned_down = list(chain.from_iterable(map(accumulate, banned_down_ij)))
# banned_left = list(chain.from_iterable(zip(*map(accumulate, banned_left_ij))))
# banned_right = list(chain.from_iterable(zip(*map(accumulate, banned_right_ij))))
# for i in range(col):
#     print(walls[i * row:(i + 1) * row])
s = row * y_dict[0] + x_dict[0]
enable = [-1] * row + ([-1] + [0] * (row - 2) + [-1]) * (col - 2) + [-1] * row
# for i in range(col):
#     print(enable[i * row:(i + 1) * row])
q = [s]
moves = [(-row, banned_up), (-1, banned_left), (1, banned_right), (row, banned_down)]
while q:
    c = q.pop()
    if enable[c] == 1:
        continue
    elif enable[c] == -1:
        print("INF")
        exit()
    enable[c] = 1
    for dc, banned in moves:
        if banned[c]:
            continue
        nc = c + dc
        if enable[nc] == 1:
            continue
        q.append(nc)
# for i in range(col):
#     print(enable[i * row:(i + 1) * row])
ans = 0
for i in range(col):
    ri = i * row
    for j in range(row):
        if enable[ri + j] != 1:
            continue
        t = y_list[i - 1]
        b = y_list[i]
        l = x_list[j - 1]
        r = x_list[j]
        ans += (b - t) * (r - l)
print(ans)

-banned_up_ij = [[0] * row for _ in range(col)]

-banned_down_ij = [[0] * row for _ in range(col)]

-banned_left_ij = [[0] * col for _ in range(row)]

-banned_right_ij = [[0] * col for _ in range(row)]

-        banned_up[ri + j] = banned_up[ri + j - 1] + ru[j]

-        banned_down[ri + j] = banned_down[ri + j - 1] + rd[j]

-        banned_left[ri1 + j] = banned_left[ri0 + j] + rl[i]

-        banned_right[ri1 + j] = banned_right[ri0 + j] + rr[i]

+        banned_up[ri1 + j] += banned_up[ri1 + j - 1]

+        banned_down[ri1 + j] += banned_down[ri1 + j - 1]

+        banned_left[ri1 + j] += banned_left[ri0 + j]

+        banned_right[ri1 + j] += banned_right[ri0 + j]


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

def main():

    s = int(eval(input()))

    mod = 10**9 + 7

    dp = [0] * (s+1)

    dp[0] = 1

    for i in range(1, s+1):

        for j in range(0, (i-3)+1):

            dp[i] += dp[j]

            dp[i] %= mod

    print((dp[-1]))

if __name__ == "__main__":

    main()

# optimized version of the same code:

def main():

    s = int(eval(input()))

    mod = 10**9 + 7

    dp = [0] * (s+1)

    dp[0] = 1

#    for i in range(1, s+1):

#        for j in range(0, (i-3)+1):

#            dp[i] += dp[j]

#            dp[i] %= mod

    for i in range(1, s+1):

        if i < 3:

            dp[i] = 0

        else:

            dp[i] = dp[i-1] + dp[i-3]

            dp[i] %= mod

    print((dp[-1]))

if __name__ == "__main__":

    main()

def main():
    s = int(eval(input()))
    mod = 10**9 + 7
    dp = [0] * (s + 1)
    dp[0] = 1
    for i in range(1, s + 1):
        for j in range(0, (i - 3) + 1):
            dp[i] += dp[j]
            dp[i] %= mod
    print((dp[-1]))

if __name__ == "__main__":
    main()

def main():
    s = int(eval(input()))
    mod = 10**9 + 7
    dp = [0] * (s + 1)
    dp[0] = 1
    #    for i in range(1, s+1):
    #        for j in range(0, (i-3)+1):
    #            dp[i] += dp[j]
    #            dp[i] %= mod
    for i in range(1, s + 1):
        if i < 3:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 3]
            dp[i] %= mod
    print((dp[-1]))

if __name__ == "__main__":
    main()

-        for j in range(0, (i - 3) + 1):


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

def main():

    n = int(eval(input()))

    import numpy as np

    ans = np.zeros((10,10))

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

        h,t = str(i)[0],str(i)[-1]

        ans[int(h)-1][int(t)-1]+=1

    s = 0

    for i in range(10):

        for j in range(10):

            s += ans[i][j]*ans[j][i]

    print((int(s)))

if __name__ == "__main__":

    main()

# optimized version of the same code:

def main():

    n = int(eval(input()))

    dp = [[0 for i in range(10)] for i in range(10)]

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

        h,t = int(str(i)[0]), int(str(i)[-1])

        dp[h][t] += 1

    ans = 0

    for i in range(10):

        for j in range(10):

            ans += dp[i][j] * dp[j][i]

    print(ans)

if __name__ == "__main__":

    main()

def main():
    n = int(eval(input()))
    import numpy as np

    ans = np.zeros((10, 10))
    for i in range(1, n + 1):
        h, t = str(i)[0], str(i)[-1]
        ans[int(h) - 1][int(t) - 1] += 1
    s = 0
    for i in range(10):
        for j in range(10):
            s += ans[i][j] * ans[j][i]
    print((int(s)))

if __name__ == "__main__":
    main()

def main():
    n = int(eval(input()))
    dp = [[0 for i in range(10)] for i in range(10)]
    for i in range(1, n + 1):
        h, t = int(str(i)[0]), int(str(i)[-1])
        dp[h][t] += 1
    ans = 0
    for i in range(10):
        for j in range(10):
            ans += dp[i][j] * dp[j][i]
    print(ans)

if __name__ == "__main__":
    main()

+    dp = [[0 for i in range(10)] for i in range(10)]


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

from collections import deque

N, *AB = list(map(int, open(0).read().split()))

E = [set() for _ in range(N + 1)]

for i, (a, b) in enumerate(zip(*[iter(AB)] * 2)):

    E[a].add((b, i))

    E[b].add((a, i))

A = [0] * (N - 1)

Q = deque([(0, 1)])

while Q:

    p, v = Q.popleft()

    c = 0

    for u, i in E[v]:

        E[u].remove((v, i))

        c += 1 + (c + 1 == p)

        Q.append((c, u))

        A[i] = c

print((max(A), *A))

# optimized version of the same code:

from collections import deque

N, *AB = list(map(int, open(0).read().split()))

E = [set() for _ in range(N + 1)]

for i, (a, b) in enumerate(zip(*[iter(AB)] * 2)):

    E[a].add((b, i))

    E[b].add((a, i))

A = [0] * (N - 1)

Q = deque([1])

while Q:

    p, v = divmod(Q.popleft(), N + 1)

    c = 0

    for u, i in E[v]:

        E[u].remove((v, i))

        c += 1 + (c + 1 == p)

        Q.append(c * (N + 1) + u)

        A[i] = c

print((max(A)))

print(("\n".join(map(str, A))))

-Q = deque([(0, 1)])
+Q = deque([1])
-    p, v = Q.popleft()
+    p, v = divmod(Q.popleft(), N + 1)
-        Q.append((c, u))
+        Q.append(c * (N + 1) + u)
-print((max(A), *A))
+print((max(A)))
+print(("\n".join(map(str, A))))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

def slove():

    import sys

    import heapq

    import collections

    input = sys.stdin.readline

    x, y, z, k = list(map(int, input().rstrip('\n').split()))

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

    a.sort(reverse=True)

    b = list(map(int, input().rstrip('\n').split()))

    b.sort(reverse=True)

    c = list(map(int, input().rstrip('\n').split()))

    c.sort(reverse=True)

    q = [[-(a[0] + b[0] + c[0]), 0, 0, 0]]

    heapq.heapify(q)

    fq = collections.defaultdict(list)

    fq[(-(a[0] + b[0] + c[0]), 0, 0, 0), 1] = 1

    t = 0

    for _ in range(k):

        if len(q) != 0:

            p = heapq.heappop(q)

            t = p[0]

            aq = p[1]

            bq = p[2]

            cq = p[3]

            if aq + 1 < len(a):

                if (-(a[aq+1] + b[bq] + c[cq]), aq+1, bq, cq) not in fq:

                    heapq.heappush(q, [-(a[aq+1] + b[bq] + c[cq]), aq+1, bq, cq])

                    fq[(-(a[aq+1] + b[bq] + c[cq]), aq+1, bq, cq)] = 1

            if bq + 1 < len(b):

                if (-(a[aq] + b[bq+1] + c[cq]), aq, bq+1, cq) not in fq:

                    heapq.heappush(q, [-(a[aq] + b[bq+1] + c[cq]), aq, bq+1, cq])

                    fq[(-(a[aq] + b[bq+1] + c[cq]), aq, bq+1, cq)] = 1

            if cq + 1 < len(c):

                if (-(a[aq] + b[bq] + c[cq+1]), aq, bq, cq+1) not in fq:

                    heapq.heappush(q, [-(a[aq] + b[bq] + c[cq+1]), aq, bq, cq+1])

                    fq[(-(a[aq] + b[bq] + c[cq+1]), aq, bq, cq+1)] = 1

        print((-t))

if __name__ == '__main__':

    slove()

# optimized version of the same code:

import sys

import collections

import heapq

def solve():

    input = sys.stdin.readline

    mod = 10 ** 9 + 7

    x, y, z, k = list(map(int, input().rstrip('\n').split()))

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

    b = list(map(int, input().rstrip('\n').split()))

    c = list(map(int, input().rstrip('\n').split()))

    a.sort(reverse=True)

    b.sort(reverse=True)

    c.sort(reverse=True)

    ql = [[-(a[0] + b[0] + c[0]), 0, 0, 0]]

    heapq.heapify(ql)

    fq = collections.defaultdict(int)

    fq[0, 0, 0]

    for i in range(k):

        s, ap, bp, cp = heapq.heappop(ql)

        for app, bpp, cpp in ([[ap+1, bp, cp], [ap, bp+1, cp], [ap, bp, cp+1]]):

            if app < x and bpp < y and cpp < z:

                if (app, bpp, cpp) not in fq:

                    heapq.heappush(ql, [-(a[app] + b[bpp] + c[cpp]), app, bpp, cpp])

                    fq[app, bpp, cpp]

        print((-s))

if __name__ == '__main__':

    solve()

def slove():
    import sys
    import heapq
    import collections

    input = sys.stdin.readline
    x, y, z, k = list(map(int, input().rstrip("\n").split()))
    a = list(map(int, input().rstrip("\n").split()))
    a.sort(reverse=True)
    b = list(map(int, input().rstrip("\n").split()))
    b.sort(reverse=True)
    c = list(map(int, input().rstrip("\n").split()))
    c.sort(reverse=True)
    q = [[-(a[0] + b[0] + c[0]), 0, 0, 0]]
    heapq.heapify(q)
    fq = collections.defaultdict(list)
    fq[(-(a[0] + b[0] + c[0]), 0, 0, 0), 1] = 1
    t = 0
    for _ in range(k):
        if len(q) != 0:
            p = heapq.heappop(q)
            t = p[0]
            aq = p[1]
            bq = p[2]
            cq = p[3]
            if aq + 1 < len(a):
                if (-(a[aq + 1] + b[bq] + c[cq]), aq + 1, bq, cq) not in fq:
                    heapq.heappush(q, [-(a[aq + 1] + b[bq] + c[cq]), aq + 1, bq, cq])
                    fq[(-(a[aq + 1] + b[bq] + c[cq]), aq + 1, bq, cq)] = 1
            if bq + 1 < len(b):
                if (-(a[aq] + b[bq + 1] + c[cq]), aq, bq + 1, cq) not in fq:
                    heapq.heappush(q, [-(a[aq] + b[bq + 1] + c[cq]), aq, bq + 1, cq])
                    fq[(-(a[aq] + b[bq + 1] + c[cq]), aq, bq + 1, cq)] = 1
            if cq + 1 < len(c):
                if (-(a[aq] + b[bq] + c[cq + 1]), aq, bq, cq + 1) not in fq:
                    heapq.heappush(q, [-(a[aq] + b[bq] + c[cq + 1]), aq, bq, cq + 1])
                    fq[(-(a[aq] + b[bq] + c[cq + 1]), aq, bq, cq + 1)] = 1
        print((-t))

if __name__ == "__main__":
    slove()

import sys
import collections
import heapq

def solve():
    input = sys.stdin.readline
    mod = 10**9 + 7
    x, y, z, k = list(map(int, input().rstrip("\n").split()))
    a = list(map(int, input().rstrip("\n").split()))
    b = list(map(int, input().rstrip("\n").split()))
    c = list(map(int, input().rstrip("\n").split()))
    a.sort(reverse=True)
    b.sort(reverse=True)
    c.sort(reverse=True)
    ql = [[-(a[0] + b[0] + c[0]), 0, 0, 0]]
    heapq.heapify(ql)
    fq = collections.defaultdict(int)
    fq[0, 0, 0]
    for i in range(k):
        s, ap, bp, cp = heapq.heappop(ql)
        for app, bpp, cpp in [[ap + 1, bp, cp], [ap, bp + 1, cp], [ap, bp, cp + 1]]:
            if app < x and bpp < y and cpp < z:
                if (app, bpp, cpp) not in fq:
                    heapq.heappush(ql, [-(a[app] + b[bpp] + c[cpp]), app, bpp, cpp])
                    fq[app, bpp, cpp]
        print((-s))

if __name__ == "__main__":
    solve()

+    b = list(map(int, input().rstrip("\n").split()))

+    c = list(map(int, input().rstrip("\n").split()))

-    b = list(map(int, input().rstrip("\n").split()))

-    c = list(map(int, input().rstrip("\n").split()))

-                if (-(a[aq + 1] + b[bq] + c[cq]), aq + 1, bq, cq) not in fq:

-                    heapq.heappush(q, [-(a[aq + 1] + b[bq] + c[cq]), aq + 1, bq, cq])

-                if (-(a[aq] + b[bq + 1] + c[cq]), aq, bq + 1, cq) not in fq:

-                    heapq.heappush(q, [-(a[aq] + b[bq + 1] + c[cq]), aq, bq + 1, cq])

-                if (-(a[aq] + b[bq] + c[cq + 1]), aq, bq, cq + 1) not in fq:

-                    heapq.heappush(q, [-(a[aq] + b[bq] + c[cq + 1]), aq, bq, cq + 1])

+        s, ap, bp, cp = heapq.heappop(ql)

+        for app, bpp, cpp in [[ap + 1, bp, cp], [ap, bp + 1, cp], [ap, bp, cp + 1]]:

+            if app < x and bpp < y and cpp < z:

+                if (app, bpp, cpp) not in fq:

+                    heapq.heappush(ql, [-(a[app] + b[bpp] + c[cpp]), app, bpp, cpp])


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

N = int(input())

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

players = [0 for _ in range(N)]

for play in list(zip(*score)):

    for i, p in enumerate(play):

        if play.count(p) == 1:

            players[i] += p

print(*players, sep='\n')

# optimized version of the same code:

N = int(input())

score = [input().split() for _ in range(N)]

players = [0]*N

for play in list(zip(*score)):

    for i, p in enumerate(play):

        if play.count(p) == 1:

            players[i] += int(p)

print(*players, sep='\n')

N = int(input())
score = [list(map(int, input().split())) for _ in range(N)]
players = [0 for _ in range(N)]
for play in list(zip(*score)):
    for i, p in enumerate(play):
        if play.count(p) == 1:
            players[i] += p
print(*players, sep="\n")

N = int(input())
score = [input().split() for _ in range(N)]
players = [0] * N
for play in list(zip(*score)):
    for i, p in enumerate(play):
        if play.count(p) == 1:
            players[i] += int(p)
print(*players, sep="\n")

-score = [list(map(int, input().split())) for _ in range(N)]

+score = [input().split() for _ in range(N)]


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

x = int(eval(input()))

poypoyo = 'po'

for i in range(10000):

    for j in range(10000):

        if i**5 - j**5 == x:

            print((i,j))

            quit()

            break

        if i**5 - (-j)**5 ==x:

            print((i,-j))

            quit()

            break

        po = 'po'

        poypoyo += po

# optimized version of the same code:

x = int(eval(input()))

for i in range(10000):

    for j in range(1000):

        if i**5 - j**5 == x:

            print((i,j))

            quit()

            break

        if i**5 - (-j)**5 ==x:

            print((i,-j))

            quit()

            break

x = int(eval(input()))
poypoyo = "po"
for i in range(10000):
    for j in range(10000):
        if i**5 - j**5 == x:
            print((i, j))
            quit()
            break
        if i**5 - (-j) ** 5 == x:
            print((i, -j))
            quit()
            break
        po = "po"
        poypoyo += po

x = int(eval(input()))
for i in range(10000):
    for j in range(1000):
        if i**5 - j**5 == x:
            print((i, j))
            quit()
            break
        if i**5 - (-j) ** 5 == x:
            print((i, -j))
            quit()
            break

-poypoyo = "po"
-    for j in range(10000):
+    for j in range(1000):
-        po = "po"
-        poypoyo += po


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

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

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

dp = [False]*(k+1)

for stones in range(k+1):

    for x in arr:

        if stones >= x and dp[stones-x] == False:

            dp[stones] = True

if dp[k]:

    print("First")

else:

    print("Second")

# optimized version of the same code:

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

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

dp = [False]*(K+1)

for i in range(K+1):

    for j in range(N):

        if i-A[j]>=0 and dp[i-A[j]] == False:

            dp[i] = True

if dp[K]:

    print("First")

else:

    print("Second")

n, k = list(map(int, input().split()))
arr = list(map(int, input().split()))
dp = [False] * (k + 1)
for stones in range(k + 1):
    for x in arr:
        if stones >= x and dp[stones - x] == False:
            dp[stones] = True
if dp[k]:
    print("First")
else:
    print("Second")

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
dp = [False] * (K + 1)
for i in range(K + 1):
    for j in range(N):
        if i - A[j] >= 0 and dp[i - A[j]] == False:
            dp[i] = True
if dp[K]:
    print("First")
else:
    print("Second")

-        if stones >= x and dp[stones - x] == False:

+        if i - A[j] >= 0 and dp[i - A[j]] == False:


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import sys

read = sys.stdin.readline

def read_ints():

    return list(map(int, read().split()))

def read_a_int():

    return int(read())

def read_matrix(H):

    '''

    H is number of rows

    '''

    return [list(map(int, read().split())) for _ in range(H)]

def read_map(H):

    '''

    H is number of rows

    文字列で与えられた盤面を読み取る用

    '''

    return [read()[:-1] for _ in range(H)]

def read_tuple(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(tuple(map(int, read().split())))

    return ret

def read_col(H, n_cols):

    '''

    H is number of rows

    n_cols is number of cols

    A列、B列が与えられるようなとき

    '''

    ret = [[] for _ in range(n_cols)]

    for _ in range(H):

        tmp = list(map(int, read().split()))

        for col in range(n_cols):

            ret[col].append(tmp[col])

    return ret

N, K = read_ints()

P = read_ints()

def ret_mean(X):

    return (X + 1) / 2

import numpy as np

P_mean = np.array([ret_mean(p) for p in P])

P_accum = np.zeros(N+1)

P_accum[1:] = P_mean.cumsum()

ans = 0

# print(P_accum)

for i in range(N - K + 1):

    j = i + K

    ans = max(ans, P_accum[j] - P_accum[i])

print(ans)

# optimized version of the same code:

import sys

read = sys.stdin.readline

def read_ints():

    return list(map(int, read().split()))

def read_a_int():

    return int(read())

def read_matrix(H):

    '''

    H is number of rows

    '''

    return [list(map(int, read().split())) for _ in range(H)]

def read_map(H):

    '''

    H is number of rows

    文字列で与えられた盤面を読み取る用

    '''

    return [read()[:-1] for _ in range(H)]

def read_tuple(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(tuple(map(int, read().split())))

    return ret

def read_col(H, n_cols):

    '''

    H is number of rows

    n_cols is number of cols

    A列、B列が与えられるようなとき

    '''

    ret = [[] for _ in range(n_cols)]

    for _ in range(H):

        tmp = list(map(int, read().split()))

        for col in range(n_cols):

            ret[col].append(tmp[col])

    return ret

N, K = read_ints()

P = read_ints()

def ret_mean(X):

    return (X + 1) / 2

class cumsum1d:

    def __init__(self, ls: list):

        '''

        1次元リストを受け取る

        '''

        from itertools import accumulate

        self.ls_accum = [0] + list(accumulate(ls))

    def total(self, i, j):

        # もとの配列lsにおける[i,j)の中合計

        return self.ls_accum[j] - self.ls_accum[i]

P_mean = [ret_mean(p) for p in P]

P_accum = cumsum1d(P_mean)

ans = 0

# print(P_accum)

for i in range(N - K + 1):

    j = i + K

    ans = max(ans, P_accum.total(i,j))

print(ans)

import sys

read = sys.stdin.readline

def read_ints():
    return list(map(int, read().split()))

def read_a_int():
    return int(read())

def read_matrix(H):
    """
    H is number of rows
    """
    return [list(map(int, read().split())) for _ in range(H)]

def read_map(H):
    """
    H is number of rows
    文字列で与えられた盤面を読み取る用
    """
    return [read()[:-1] for _ in range(H)]

def read_tuple(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret

def read_col(H, n_cols):
    """
    H is number of rows
    n_cols is number of cols
    A列、B列が与えられるようなとき
    """
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])
    return ret

N, K = read_ints()
P = read_ints()

def ret_mean(X):
    return (X + 1) / 2

import numpy as np

P_mean = np.array([ret_mean(p) for p in P])
P_accum = np.zeros(N + 1)
P_accum[1:] = P_mean.cumsum()
ans = 0
# print(P_accum)
for i in range(N - K + 1):
    j = i + K
    ans = max(ans, P_accum[j] - P_accum[i])
print(ans)

import sys

read = sys.stdin.readline

def read_ints():
    return list(map(int, read().split()))

def read_a_int():
    return int(read())

def read_matrix(H):
    """
    H is number of rows
    """
    return [list(map(int, read().split())) for _ in range(H)]

def read_map(H):
    """
    H is number of rows
    文字列で与えられた盤面を読み取る用
    """
    return [read()[:-1] for _ in range(H)]

def read_tuple(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret

def read_col(H, n_cols):
    """
    H is number of rows
    n_cols is number of cols
    A列、B列が与えられるようなとき
    """
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])
    return ret

N, K = read_ints()
P = read_ints()

def ret_mean(X):
    return (X + 1) / 2

class cumsum1d:
    def __init__(self, ls: list):
        """
        1次元リストを受け取る
        """
        from itertools import accumulate

        self.ls_accum = [0] + list(accumulate(ls))

    def total(self, i, j):
        # もとの配列lsにおける[i,j)の中合計
        return self.ls_accum[j] - self.ls_accum[i]

P_mean = [ret_mean(p) for p in P]
P_accum = cumsum1d(P_mean)
ans = 0
# print(P_accum)
for i in range(N - K + 1):
    j = i + K
    ans = max(ans, P_accum.total(i, j))
print(ans)

+        1次元リストを受け取る

+        from itertools import accumulate

-P_mean = np.array([ret_mean(p) for p in P])

+        self.ls_accum = [0] + list(accumulate(ls))

+        # もとの配列lsにおける[i,j)の中合計

+        return self.ls_accum[j] - self.ls_accum[i]

-    ans = max(ans, P_accum[j] - P_accum[i])

+    ans = max(ans, P_accum.total(i, j))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

W = input().lower()

s = []

while True:

    T = list(map(str, input().split()))

    if(T[0] == "END_OF_TEXT"):

        break

    else:

        for i in range(len(T)):

            s.append(T[i].lower())

ans = 0

for i in range(len(s)):

    if(s[i] == W):

        ans += 1

print(ans)

# optimized version of the same code:

W = input().lower()

s = []

ans = 0

while True:

    T = list(map(str, input().split()))

    if(T[0] == "END_OF_TEXT"):

        break

    else:

        for i in range(len(T)):

            if(W == T[i].lower()):

                ans += 1

print(ans)

W = input().lower()
s = []
while True:
    T = list(map(str, input().split()))
    if T[0] == "END_OF_TEXT":
        break
    else:
        for i in range(len(T)):
            s.append(T[i].lower())
ans = 0
for i in range(len(s)):
    if s[i] == W:
        ans += 1
print(ans)

W = input().lower()
s = []
ans = 0
while True:
    T = list(map(str, input().split()))
    if T[0] == "END_OF_TEXT":
        break
    else:
        for i in range(len(T)):
            if W == T[i].lower():
                ans += 1
print(ans)

+ans = 0
-            s.append(T[i].lower())
-ans = 0
-for i in range(len(s)):
-    if s[i] == W:
-        ans += 1
+            if W == T[i].lower():
+                ans += 1


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import numpy as np

s = input()[::-1]

length = len(s)

a = np.zeros(length, dtype=int)

d = np.zeros(length, dtype=int)

ans = np.zeros(2019, dtype=int)

x = 10

a[0] = int(s[0])

d[0] = a[0]

ans[d[0]] += 1

for i in range(1, length):

    a[i] = int(s[i]) * x % 2019

    d[i] = (d[i-1] + a[i]) % 2019

    ans[d[i]] += 1

    x = x * 10 % 2019

ans_c = ans[np.nonzero(ans)]

print((int(sum([ans_c[i] * (ans_c[i]-1) for i in range(ans_c.shape[0])]) / 2) + ans[0]))

# optimized version of the same code:

import numpy as np

s = input()[::-1]
length = len(s)
a = np.zeros(length, dtype=int)
d = np.zeros(length, dtype=int)
ans = np.zeros(2019, dtype=int)
x = 10
a[0] = int(s[0])
d[0] = a[0]
ans[d[0]] += 1
for i in range(1, length):
    a[i] = int(s[i]) * x % 2019
    d[i] = (d[i - 1] + a[i]) % 2019
    ans[d[i]] += 1
    x = x * 10 % 2019
ans_c = ans[np.nonzero(ans)]
print(
    (int(sum([ans_c[i] * (ans_c[i] - 1) for i in range(ans_c.shape[0])]) / 2) + ans[0])
)

-    (int(sum([ans_c[i] * (ans_c[i] - 1) for i in range(ans_c.shape[0])]) / 2) + ans[0])

+print((int(sum([ans[i] * (ans[i] - 1) for i in range(2019)]) / 2) + ans[0]))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import numpy as np

h,w=map(int,input().split())

t=[list(input()) for _ in range(h)]

for i in range(h):

    t[i]=[(tij=="#")*1 for tij in t[i]]

t=np.array(t,dtype="i2")

rows=[]

columns=[]

for i in range(h):

    if np.sum(t[i])==0:

        rows+=[i]

for j in range(w):

    if np.sum(t[:,j])==0:

        columns+=[j]

t=np.delete(t,rows,0)

t=np.delete(t,columns,1)

for i in range(h-len(rows)):

    print(*["#" if tij else "." for tij in t[i]],sep="")

# optimized version of the same code:

h,w=map(int,input().split())

t=[list(input()) for _ in range(h)]

for i in range(h):

    t[i]=[(tij=="#")*1 for tij in t[i]]

rows=[]

columns=[]

for i,ti in enumerate(t):

    if sum(ti)==0:

        rows+=[i]

for j,tj in enumerate(zip(*t)):

    if sum(tj)==0:

        columns+=[j]

nt=[]

for i,ti in enumerate(t):

    if i in rows:continue

    nti=[]

    for j,tij in enumerate(ti):

        if j in columns:continue

        nti+=["#" if tij else "."]

    print(*nti,sep="")

import numpy as np

h, w = map(int, input().split())
t = [list(input()) for _ in range(h)]
for i in range(h):
    t[i] = [(tij == "#") * 1 for tij in t[i]]
t = np.array(t, dtype="i2")
rows = []
columns = []
for i in range(h):
    if np.sum(t[i]) == 0:
        rows += [i]
for j in range(w):
    if np.sum(t[:, j]) == 0:
        columns += [j]
t = np.delete(t, rows, 0)
t = np.delete(t, columns, 1)
for i in range(h - len(rows)):
    print(*["#" if tij else "." for tij in t[i]], sep="")

h, w = map(int, input().split())
t = [list(input()) for _ in range(h)]
for i in range(h):
    t[i] = [(tij == "#") * 1 for tij in t[i]]
rows = []
columns = []
for i, ti in enumerate(t):
    if sum(ti) == 0:
        rows += [i]
for j, tj in enumerate(zip(*t)):
    if sum(tj) == 0:
        columns += [j]
nt = []
for i, ti in enumerate(t):
    if i in rows:
        continue
    nti = []
    for j, tij in enumerate(ti):
        if j in columns:
            continue
        nti += ["#" if tij else "."]
    print(*nti, sep="")

-    print(*["#" if tij else "." for tij in t[i]], sep="")


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import math

print((math.factorial(int(eval(input())))%(10**9+7)))

# optimized version of the same code:

n=int(eval(input()))

ans=1

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

    ans*=i

    ans%=10**9+7

print(ans)

import math

print((math.factorial(int(eval(input()))) % (10**9 + 7)))

n = int(eval(input()))
ans = 1
for i in range(1, n + 1):
    ans *= i
    ans %= 10**9 + 7
print(ans)

-print((math.factorial(int(eval(input()))) % (10**9 + 7)))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

N = int(readline())

S = read().split()

S = sorted(S)

ls = [[] for i in range(N + 1)]

max_num = 0

left = 0

right = 0

while right < N:

    while right < N and S[left] == S[right]:

        right += 1

    if (right  - left) >= max_num:

        ls[right - left].append(S[left].decode())

        max_num = right - left

    left = right

print(('\n'.join(ls[max_num])))

# optimized version of the same code:

from collections import Counter

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

N = int(readline())

S = read().split()

res = []

c = Counter(S)

max_num = c.most_common(1)[0][1]

for i, j in list(c.items()):

    if j == max_num:

        res.append(i)

res.sort()

print(('\n'.join(list([x.decode() for x in res]))))

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
S = read().split()
S = sorted(S)
ls = [[] for i in range(N + 1)]
max_num = 0
left = 0
right = 0
while right < N:
    while right < N and S[left] == S[right]:
        right += 1
    if (right - left) >= max_num:
        ls[right - left].append(S[left].decode())
        max_num = right - left
    left = right
print(("\n".join(ls[max_num])))

from collections import Counter
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
S = read().split()
res = []
c = Counter(S)
max_num = c.most_common(1)[0][1]
for i, j in list(c.items()):
    if j == max_num:
        res.append(i)
res.sort()
print(("\n".join(list([x.decode() for x in res]))))

-    while right < N and S[left] == S[right]:

-        ls[right - left].append(S[left].decode())

+print(("\n".join(list([x.decode() for x in res]))))


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

# temp

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

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

dp = [0] + [float("inf")]*(10**5)

for i in range(n):

    for j in range(10**5,wv[i][1]-1,-1):

        dp[j] = min(dp[j],dp[j-wv[i][1]]+wv[i][0])

res = 0

for v,e in enumerate(dp):

    if e <= w:

        res = v

print(res)

# optimized version of the same code:

# dpE - Knapsack 2

import sys

input = sys.stdin.readline

def main():

    n, W = tuple(map(int, input().rstrip().split()))

    A = tuple(tuple(map(int, input().rstrip().split())) for _ in range(n))

    _, v = list(zip(*A))

    lim = sum(v)

    dp = [0] + [float("inf")] * lim

    for i in range(n):

        for j in range(lim, A[i][1] - 1, -1):

            dp[j] = min(dp[j], dp[j - A[i][1]] + A[i][0])

    ans = max(v for v, w in enumerate(dp) if w <= W)

    print(ans)

if __name__ == "__main__":

    main()

# temp
n, w = list(map(int, input().split()))
wv = [tuple(map(int, input().split())) for i in range(n)]
dp = [0] + [float("inf")] * (10**5)
for i in range(n):
    for j in range(10**5, wv[i][1] - 1, -1):
        dp[j] = min(dp[j], dp[j - wv[i][1]] + wv[i][0])
res = 0
for v, e in enumerate(dp):
    if e <= w:
        res = v
print(res)

-wv = [tuple(map(int, input().split())) for i in range(n)]

+    n, W = tuple(map(int, input().rstrip().split()))

+    A = tuple(tuple(map(int, input().rstrip().split())) for _ in range(n))

+        for j in range(lim, A[i][1] - 1, -1):

+    ans = max(v for v, w in enumerate(dp) if w <= W)


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

def main():

  n = int(eval(input()))

  dp = [0]*(n+1)

  dp[0] = 1

  mod = pow(10, 9) + 7

  for i in range(n+1):

    for j in range(i-2):

      dp[i] += dp[j]

      dp[i] %= mod

  print((dp[n]))

if __name__ == "__main__":

  main()

# optimized version of the same code:

def main():

  n = int(eval(input()))

  dp = [0]*(n+1)

  dp[0] = 1

  mod = pow(10, 9) + 7

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

    dp[i] = dp[i-1] + dp[i-3]

    dp[i] %= mod

  print((dp[n]))

if __name__ == "__main__":

  main()

def main():
    n = int(eval(input()))
    dp = [0] * (n + 1)
    dp[0] = 1
    mod = pow(10, 9) + 7
    for i in range(n + 1):
        for j in range(i - 2):
            dp[i] += dp[j]
            dp[i] %= mod
    print((dp[n]))

if __name__ == "__main__":
    main()

def main():
    n = int(eval(input()))
    dp = [0] * (n + 1)
    dp[0] = 1
    mod = pow(10, 9) + 7
    for i in range(3, n + 1):
        dp[i] = dp[i - 1] + dp[i - 3]
        dp[i] %= mod
    print((dp[n]))

if __name__ == "__main__":
    main()

-    for i in range(n + 1):
-        for j in range(i - 2):
-            dp[i] += dp[j]
-            dp[i] %= mod
+    for i in range(3, n + 1):
+        dp[i] = dp[i - 1] + dp[i - 3]
+        dp[i] %= mod


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

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

"""

参考：http://drken1215.hatenablog.com/entry/2018/09/23/224100

　　　http://tutuz.hateblo.jp/entry/2018/09/24/121248

・素因数分解と重複組み合わせ

・毎回階乗やると死ぬから階乗と逆元のテーブル作る(忘れてた)

"""

from collections import defaultdict

from math import sqrt

MOD = 10 ** 9 + 7

def fact_prime(num):

    d = defaultdict(int)

    # 終点はルート切り捨て+1

    end = int(sqrt(num)) + 1

    for i in range(2, end+1):

        cnt = 0

        # 素因数分解：小さい方から割れるだけ割って素数をカウント

        while num % i == 0:

            num //= i

            d[i] += 1

        # 1まで来たら終了

        if num == 1:

            break

    # 最後までそのまま来たやつはnumが素数(ただし1^1は1^0なので数に入れない)

    if num != 1:

        d[num] += 1

    return d

# とりあえずv+N-1が収まればいいはず

MAX = 10 ** 5 * 2

# 予め組み合わせ計算に必要な階乗と逆元のテーブルを作っておく

factorial = [1] * (MAX)

factorial[0] = factorial[1] = 1

for i in range(2, MAX):

    factorial[i] = factorial[i-1] * i % MOD

inverse = [1] * (MAX)

# powに第三引数入れると冪乗のmod付計算を高速にやってくれる

inverse[MAX-1] = pow(factorial[MAX-1], MOD-2, MOD)

for i in range(MAX-2, 0, -1):

    # 最後から戻っていくこのループならH+W回powするより処理が速い

    inverse[i] = inverse[i+1] * (i+1) % MOD

# 組み合わせの数

def nCr(n, r):

    # 10C7 = 10C3

    r = min(r, n-r)

    # 分子の計算

    numerator = factorial[n]

    # 分母の計算

    denominator = inverse[r] * inverse[n-r] % MOD

    return numerator * denominator % MOD

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

# d = fact_prime(M)

# print(d)

ans = 1

for k, v in list(fact_prime(M).items()):

    # 重複組み合わせ

    # v個のkとN-1個の仕切りから、v個を並べる(v+N-1個のマスからv個を選び出す組み合わせ)

    ans = (ans * nCr(v+N-1, v)) % MOD

print(ans)

# optimized version of the same code:

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

import sys

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

def list2d(a, b, c): return [[c] * b for i in range(a)]

def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1): return int(-(-x // y))

def INT(): return int(eval(input()))

def MAP(): return list(map(int, input().split()))

def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes(): print('Yes')

def No(): print('No')

def YES(): print('YES')

def NO(): print('NO')

sys.setrecursionlimit(10 ** 9)

INF = float('inf')

MOD = 10 ** 9 + 7

def factorize(num: int) -> dict:

    """ 素因数分解 """

    from math import sqrt

    from collections import Counter

    d = Counter()

    # 終点はルート切り捨て+1

    for i in range(2, int(sqrt(num))+1):

        # 素因数分解：小さい方から割れるだけ割って素数をカウント

        while num % i == 0:

            num //= i

            d[i] += 1

        # 1まで分解したら終了

        if num == 1:

            break

    # 最後に残ったnumは素数(ただし1^1は1^0なので数に入れない)

    if num != 1:

        d[num] += 1

    return d

class FactInvMOD:

    """ 階乗たくさん使う時用のテーブル準備 """

    def __init__(self, MAX, MOD):

        """ MAX：階乗に使う数値の最大以上まで作る """

        MAX += 1

        self.MAX = MAX

        self.MOD = MOD

        # 階乗テーブル

        factorial = [1] * MAX

        factorial[0] = factorial[1] = 1

        for i in range(2, MAX):

            factorial[i] = factorial[i-1] * i % MOD

        # 階乗の逆元テーブル

        inverse = [1] * MAX

        # powに第三引数入れると冪乗のmod付計算を高速にやってくれる

        inverse[MAX-1] = pow(factorial[MAX-1], MOD-2, MOD)

        for i in range(MAX-2, 0, -1):

            # 最後から戻っていくこのループならMAX回powするより処理が速い

            inverse[i] = inverse[i+1] * (i+1) % MOD

        self.fact = factorial

        self.inv = inverse

    def nCr(self, n, r):

        """ 組み合わせの数 (必要な階乗と逆元のテーブルを事前に作っておく) """

        if n < r: return 0

        # 10C7 = 10C3

        r = min(r, n-r)

        # 分子の計算

        numerator = self.fact[n]

        # 分母の計算

        denominator = self.inv[r] * self.inv[n-r] % self.MOD

        return numerator * denominator % self.MOD

    def nPr(self, n, r):

        """ 順列 """

        if n < r: return 0

        return self.fact[n] * self.inv[n-r] % self.MOD

    def nHr(self, n, r):

        """ 重複組み合わせ """

        # r個選ぶところにN-1個の仕切りを入れる

        return self.nCr(r+n-1, r)

N, M = MAP()

d = factorize(M)

# 例外処理

if not d:

    print((1))

    exit()

MAX = N + max(d.values())

fim = FactInvMOD(MAX, MOD)

ans = 1

for k, v in list(d.items()):

    ans *= fim.nHr(N, v)

    ans %= MOD

print(ans)

# -*- coding: utf-8 -*-
"""
参考：http://drken1215.hatenablog.com/entry/2018/09/23/224100
　　　http://tutuz.hateblo.jp/entry/2018/09/24/121248
・素因数分解と重複組み合わせ
・毎回階乗やると死ぬから階乗と逆元のテーブル作る(忘れてた)
"""
from collections import defaultdict
from math import sqrt

MOD = 10**9 + 7

def fact_prime(num):
    d = defaultdict(int)
    # 終点はルート切り捨て+1
    end = int(sqrt(num)) + 1
    for i in range(2, end + 1):
        cnt = 0
        # 素因数分解：小さい方から割れるだけ割って素数をカウント
        while num % i == 0:
            num //= i
            d[i] += 1
        # 1まで来たら終了
        if num == 1:
            break
    # 最後までそのまま来たやつはnumが素数(ただし1^1は1^0なので数に入れない)
    if num != 1:
        d[num] += 1
    return d

# とりあえずv+N-1が収まればいいはず
MAX = 10**5 * 2
# 予め組み合わせ計算に必要な階乗と逆元のテーブルを作っておく
factorial = [1] * (MAX)
factorial[0] = factorial[1] = 1
for i in range(2, MAX):
    factorial[i] = factorial[i - 1] * i % MOD
inverse = [1] * (MAX)
# powに第三引数入れると冪乗のmod付計算を高速にやってくれる
inverse[MAX - 1] = pow(factorial[MAX - 1], MOD - 2, MOD)
for i in range(MAX - 2, 0, -1):
    # 最後から戻っていくこのループならH+W回powするより処理が速い
    inverse[i] = inverse[i + 1] * (i + 1) % MOD
# 組み合わせの数
def nCr(n, r):
    # 10C7 = 10C3
    r = min(r, n - r)
    # 分子の計算
    numerator = factorial[n]
    # 分母の計算
    denominator = inverse[r] * inverse[n - r] % MOD
    return numerator * denominator % MOD

N, M = list(map(int, input().split()))
# d = fact_prime(M)
# print(d)
ans = 1
for k, v in list(fact_prime(M).items()):
    # 重複組み合わせ
    # v個のkとN-1個の仕切りから、v個を並べる(v+N-1個のマスからv個を選び出す組み合わせ)
    ans = (ans * nCr(v + N - 1, v)) % MOD
print(ans)

# -*- coding: utf-8 -*-
import sys

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

def list2d(a, b, c):
    return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
    return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
    return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
    return int(-(-x // y))

def INT():
    return int(eval(input()))

def MAP():
    return list(map(int, input().split()))

def LIST(N=None):
    return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
    print("Yes")

def No():
    print("No")

def YES():
    print("YES")

def NO():
    print("NO")

sys.setrecursionlimit(10**9)
INF = float("inf")
MOD = 10**9 + 7

def factorize(num: int) -> dict:
    """素因数分解"""
    from math import sqrt
    from collections import Counter

    d = Counter()
    # 終点はルート切り捨て+1
    for i in range(2, int(sqrt(num)) + 1):
        # 素因数分解：小さい方から割れるだけ割って素数をカウント
        while num % i == 0:
            num //= i
            d[i] += 1
        # 1まで分解したら終了
        if num == 1:
            break
    # 最後に残ったnumは素数(ただし1^1は1^0なので数に入れない)
    if num != 1:
        d[num] += 1
    return d

class FactInvMOD:
    """階乗たくさん使う時用のテーブル準備"""

    def __init__(self, MAX, MOD):
        """MAX：階乗に使う数値の最大以上まで作る"""
        MAX += 1
        self.MAX = MAX
        self.MOD = MOD
        # 階乗テーブル
        factorial = [1] * MAX
        factorial[0] = factorial[1] = 1
        for i in range(2, MAX):
            factorial[i] = factorial[i - 1] * i % MOD
        # 階乗の逆元テーブル
        inverse = [1] * MAX
        # powに第三引数入れると冪乗のmod付計算を高速にやってくれる
        inverse[MAX - 1] = pow(factorial[MAX - 1], MOD - 2, MOD)
        for i in range(MAX - 2, 0, -1):
            # 最後から戻っていくこのループならMAX回powするより処理が速い
            inverse[i] = inverse[i + 1] * (i + 1) % MOD
        self.fact = factorial
        self.inv = inverse

    def nCr(self, n, r):
        """組み合わせの数 (必要な階乗と逆元のテーブルを事前に作っておく)"""
        if n < r:
            return 0
        # 10C7 = 10C3
        r = min(r, n - r)
        # 分子の計算
        numerator = self.fact[n]
        # 分母の計算
        denominator = self.inv[r] * self.inv[n - r] % self.MOD
        return numerator * denominator % self.MOD

    def nPr(self, n, r):
        """順列"""
        if n < r:
            return 0
        return self.fact[n] * self.inv[n - r] % self.MOD

    def nHr(self, n, r):
        """重複組み合わせ"""
        # r個選ぶところにN-1個の仕切りを入れる
        return self.nCr(r + n - 1, r)

N, M = MAP()
d = factorize(M)
# 例外処理
if not d:
    print((1))
    exit()
MAX = N + max(d.values())
fim = FactInvMOD(MAX, MOD)
ans = 1
for k, v in list(d.items()):
    ans *= fim.nHr(N, v)
    ans %= MOD
print(ans)

-・素因数分解と重複組み合わせ

-・毎回階乗やると死ぬから階乗と逆元のテーブル作る(忘れてた)

+    return sys.stdin.readline().strip()

+    return [[[d] * c for j in range(b)] for i in range(a)]

+    return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

+    return list(map(int, input().split()))

+    return list(MAP()) if N is None else [INT() for i in range(N)]

+    for i in range(2, int(sqrt(num)) + 1):

-        # 1まで来たら終了

+        # 1まで分解したら終了

-    # 最後までそのまま来たやつはnumが素数(ただし1^1は1^0なので数に入れない)

+    # 最後に残ったnumは素数(ただし1^1は1^0なので数に入れない)

-# とりあえずv+N-1が収まればいいはず

-# 予め組み合わせ計算に必要な階乗と逆元のテーブルを作っておく

-    factorial[i] = factorial[i - 1] * i % MOD

-# powに第三引数入れると冪乗のmod付計算を高速にやってくれる

-inverse[MAX - 1] = pow(factorial[MAX - 1], MOD - 2, MOD)

-    # 最後から戻っていくこのループならH+W回powするより処理が速い

-    inverse[i] = inverse[i + 1] * (i + 1) % MOD

-    # 分子の計算

-    # 分母の計算

-    denominator = inverse[r] * inverse[n - r] % MOD

-    return numerator * denominator % MOD

+    """階乗たくさん使う時用のテーブル準備"""

+        """MAX：階乗に使う数値の最大以上まで作る"""

+        # 階乗テーブル

+        factorial[0] = factorial[1] = 1

+            factorial[i] = factorial[i - 1] * i % MOD

+        # 階乗の逆元テーブル

+        # powに第三引数入れると冪乗のmod付計算を高速にやってくれる

+        inverse[MAX - 1] = pow(factorial[MAX - 1], MOD - 2, MOD)

+        for i in range(MAX - 2, 0, -1):

+            # 最後から戻っていくこのループならMAX回powするより処理が速い

+            inverse[i] = inverse[i + 1] * (i + 1) % MOD

+        """組み合わせの数 (必要な階乗と逆元のテーブルを事前に作っておく)"""

+        # 分子の計算

+        # 分母の計算

+        denominator = self.inv[r] * self.inv[n - r] % self.MOD

+        return numerator * denominator % self.MOD

+        return self.fact[n] * self.inv[n - r] % self.MOD

+        """重複組み合わせ"""

+        # r個選ぶところにN-1個の仕切りを入れる

-for k, v in list(fact_prime(M).items()):

-    # 重複組み合わせ

-    # v個のkとN-1個の仕切りから、v個を並べる(v+N-1個のマスからv個を選び出す組み合わせ)

-    ans = (ans * nCr(v + N - 1, v)) % MOD


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

import sys

import numpy as np

from heapq import heappop, heappush

# Dijikstra

def main():

    H, W = list(map(int, sys.stdin.readline().split()))

    grid = np.array([list(sys.stdin.readline().rstrip()) for _ in range(H)])

    grid = np.pad(grid, 1, 'constant')

    # atcoderではnp.pad() のargにconstant_valuesを指定できない

    q = []

    heappush(q, (0, 1, 1))

    visited = set()

    cost = np.full((H + 1, W + 1), np.inf)

    cost[1][1] = 0

    while q:

        c, i, j = heappop(q)

        if (i, j) in visited:

            continue

        visited.add((i, j))

        cost[i][j] = c

        if i == H and j == W:

            break

        for dy, dx in [(1, 0), (0, 1), (-1, 0), (0, -1)]:

            y = i + dy

            x = j + dx

            if grid[y][x] == '.' and not (y, x) in visited:

                heappush(q, (c + 1, y, x))

    if cost[H][W] != np.inf:

        ans = int(np.sum(grid == '.') - (cost[H][W] + 1))

    else:

        ans = -1

    print(ans)

if __name__ == "__main__":

    main()

# optimized version of the same code:

import sys

from heapq import heappop, heappush

H, W = list(map(int, sys.stdin.readline().split()))

grid = ['#' * (W + 2)]

grid += ['#' + sys.stdin.readline().rstrip() + '#' for _ in range(H)]

grid += ['#' * (W + 2)]

def heuristic_cost(y, x):

    return abs(H - y) + abs(W - x)

def main():

    h = heuristic_cost(1, 1)

    c = 0

    s = h + c

    hq = [(s, c, 1, 1)]

    nex = [(1, 0), (0, 1), (-1, 0), (0, -1)]

    cost = [[None] * (W+1) for _ in range(H+1)]

    while hq:

        s, c, y, x = heappop(hq)

        if not cost[y][x] is None:

            continue

        cost[y][x] = c

        for dy, dx in nex:

            i = y + dy

            j = x + dx

            if grid[i][j] == '.' and cost[i][j] is None:

                h = heuristic_cost(i, j)

                s = h + (c + 1)

                heappush(hq, (s, c+1, i, j))

    white_cnt = 0

    for i in range(1, H+1):

        for j in range(1, W+1):

            white_cnt += (grid[i][j] == '.') & 1

    ans = white_cnt - (cost[H][W] + 1) if not cost[H][W] is None else -1

    return ans

if __name__ == '__main__':

    ans = main()

    print(ans)

import sys
import numpy as np
from heapq import heappop, heappush

# Dijikstra
def main():
    H, W = list(map(int, sys.stdin.readline().split()))
    grid = np.array([list(sys.stdin.readline().rstrip()) for _ in range(H)])
    grid = np.pad(grid, 1, "constant")
    # atcoderではnp.pad() のargにconstant_valuesを指定できない
    q = []
    heappush(q, (0, 1, 1))
    visited = set()
    cost = np.full((H + 1, W + 1), np.inf)
    cost[1][1] = 0
    while q:
        c, i, j = heappop(q)
        if (i, j) in visited:
            continue
        visited.add((i, j))
        cost[i][j] = c
        if i == H and j == W:
            break
        for dy, dx in [(1, 0), (0, 1), (-1, 0), (0, -1)]:
            y = i + dy
            x = j + dx
            if grid[y][x] == "." and not (y, x) in visited:
                heappush(q, (c + 1, y, x))
    if cost[H][W] != np.inf:
        ans = int(np.sum(grid == ".") - (cost[H][W] + 1))
    else:
        ans = -1
    print(ans)

if __name__ == "__main__":
    main()

import sys
from heapq import heappop, heappush

H, W = list(map(int, sys.stdin.readline().split()))
grid = ["#" * (W + 2)]
grid += ["#" + sys.stdin.readline().rstrip() + "#" for _ in range(H)]
grid += ["#" * (W + 2)]

def heuristic_cost(y, x):
    return abs(H - y) + abs(W - x)

def main():
    h = heuristic_cost(1, 1)
    c = 0
    s = h + c
    hq = [(s, c, 1, 1)]
    nex = [(1, 0), (0, 1), (-1, 0), (0, -1)]
    cost = [[None] * (W + 1) for _ in range(H + 1)]
    while hq:
        s, c, y, x = heappop(hq)
        if not cost[y][x] is None:
            continue
        cost[y][x] = c
        for dy, dx in nex:
            i = y + dy
            j = x + dx
            if grid[i][j] == "." and cost[i][j] is None:
                h = heuristic_cost(i, j)
                s = h + (c + 1)
                heappush(hq, (s, c + 1, i, j))
    white_cnt = 0
    for i in range(1, H + 1):
        for j in range(1, W + 1):
            white_cnt += (grid[i][j] == ".") & 1
    ans = white_cnt - (cost[H][W] + 1) if not cost[H][W] is None else -1
    return ans

if __name__ == "__main__":
    ans = main()
    print(ans)

+H, W = list(map(int, sys.stdin.readline().split()))

+grid += ["#" + sys.stdin.readline().rstrip() + "#" for _ in range(H)]

-    H, W = list(map(int, sys.stdin.readline().split()))

-    grid = np.array([list(sys.stdin.readline().rstrip()) for _ in range(H)])

-    # atcoderではnp.pad() のargにconstant_valuesを指定できない

-    cost = np.full((H + 1, W + 1), np.inf)

+    cost = [[None] * (W + 1) for _ in range(H + 1)]

-            if grid[y][x] == "." and not (y, x) in visited:

-                heappush(q, (c + 1, y, x))

-        ans = int(np.sum(grid == ".") - (cost[H][W] + 1))

+            if grid[i][j] == "." and cost[i][j] is None:

+                h = heuristic_cost(i, j)

+                heappush(hq, (s, c + 1, i, j))

+    ans = white_cnt - (cost[H][W] + 1) if not cost[H][W] is None else -1


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

def sol(n):

    d = {}

    N = 100000

    for i in range(-N, N+1):

        d[i**5]=i

    for i in d:

        j = n+i

        if j in d:

            print(d[j], d[i])

            return

def main():

    n = eval(input())

    sol(n)

if __name__ == '__main__':

    main()

# optimized version of the same code:

def sol(n):

    d = {}

    N = 1000

    for i in range(-N, N+1):

        d[i**5]=i

    for i in d:

        j = n+i

        if j in d:

            print(d[j], d[i])

            return

def main():

    n = eval(input())

    sol(n)

if __name__ == '__main__':

    main()

def sol(n):
    d = {}
    N = 100000
    for i in range(-N, N + 1):
        d[i**5] = i
    for i in d:
        j = n + i
        if j in d:
            print(d[j], d[i])
            return

def main():
    n = eval(input())
    sol(n)

if __name__ == "__main__":
    main()

def sol(n):
    d = {}
    N = 1000
    for i in range(-N, N + 1):
        d[i**5] = i
    for i in d:
        j = n + i
        if j in d:
            print(d[j], d[i])
            return

def main():
    n = eval(input())
    sol(n)

if __name__ == "__main__":
    main()


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

class Queue:

    def __init__(self,values):

        self.values = values

    def empty(self):

        if len(self.values) == 0:

            return True

        else:

            return False

    def enqueue(self,v):

        self.values.append(v)

    def dequeue(self):

        if len(self.values) <= 0:

            raise

        else:

            v = self.values[0]

            del self.values[0]

            return v

n,q = list(map(int,input().split(' ')))

processes = []

for i in range(n):

    n,t = input().split(' ')

    processes.append((n,int(t)))

queue = Queue(processes)

clock = 0

done = []

while not queue.empty():

    p = queue.dequeue()

    n = p[0]

    t = p[1]

    if t <= q:

        clock+=t

        done.append((n,clock))

    else:

        queue.enqueue((n,t-q))

        clock+=q

for p in done:

    print(p[0],p[1])

# optimized version of the same code:

class Queue:

    def __init__(self,l):

        self.values = []

        self.l = l

        for _ in range(l):

            self.values.append(None)

        self.head = 0

        self.tail = 0

    def inc(self,n):

        if n+1 >= self.l:

            return 0

        else:

            return n+1

    def enqueue(self,v):

        if self.inc(self.head) == self.tail:

            print('overflow')

            exit()

        self.values[self.head] = v

        self.head = self.inc(self.head)

    def dequeue(self):

        if self.head == self.tail:

            print('underflow')

            exit()

        v = self.values[self.tail]

        self.tail = self.inc(self.tail)

        return v

    def size(self):

        if self.head >= self.tail:

            return self.head-self.tail

        else:

            self.head + (self.l-self.tail)

n,q = list(map(int,input().split(' ')))

queue = Queue(200000)

for _ in range(n):

    n,t = input().split(' ')

    t = int(t)

    queue.enqueue((n,t))

c = 0

while queue.size()>0:

    n,t = queue.dequeue()

    if t <= q:

        c += t

        print(n,c)

    else:

        queue.enqueue((n,t-q))

        c += q

class Queue:
    def __init__(self, values):
        self.values = values

    def empty(self):
        if len(self.values) == 0:
            return True
        else:
            return False

    def enqueue(self, v):
        self.values.append(v)

    def dequeue(self):
        if len(self.values) <= 0:
            raise
        else:
            v = self.values[0]
            del self.values[0]
            return v

n, q = list(map(int, input().split(" ")))
processes = []
for i in range(n):
    n, t = input().split(" ")
    processes.append((n, int(t)))
queue = Queue(processes)
clock = 0
done = []
while not queue.empty():
    p = queue.dequeue()
    n = p[0]
    t = p[1]
    if t <= q:
        clock += t
        done.append((n, clock))
    else:
        queue.enqueue((n, t - q))
        clock += q
for p in done:
    print(p[0], p[1])

class Queue:
    def __init__(self, l):
        self.values = []
        self.l = l
        for _ in range(l):
            self.values.append(None)
        self.head = 0
        self.tail = 0

    def inc(self, n):
        if n + 1 >= self.l:
            return 0
        else:
            return n + 1

    def enqueue(self, v):
        if self.inc(self.head) == self.tail:
            print("overflow")
            exit()
        self.values[self.head] = v
        self.head = self.inc(self.head)

    def dequeue(self):
        if self.head == self.tail:
            print("underflow")
            exit()
        v = self.values[self.tail]
        self.tail = self.inc(self.tail)
        return v

    def size(self):
        if self.head >= self.tail:
            return self.head - self.tail
        else:
            self.head + (self.l - self.tail)

n, q = list(map(int, input().split(" ")))
queue = Queue(200000)
for _ in range(n):
    n, t = input().split(" ")
    t = int(t)
    queue.enqueue((n, t))
c = 0
while queue.size() > 0:
    n, t = queue.dequeue()
    if t <= q:
        c += t
        print(n, c)
    else:
        queue.enqueue((n, t - q))
        c += q

+        if self.inc(self.head) == self.tail:

+        self.head = self.inc(self.head)

+        self.tail = self.inc(self.tail)

+            return self.head - self.tail

+            self.head + (self.l - self.tail)


Input:
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')

# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)

# slower version:

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

# Cを買った個数とA、B単品で買った場合のコストを愚直に試す

total = 1<<60

for i in range(10**5+1):

  cost = 2*C*i + max(X-i, 0)*A + max(Y-i, 0)*B

  total = min(cost, total)

print(total)

# optimized version of the same code:

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

if (A+B) <= 2*C: # 単品だけで購入

  print((X*A + Y*B))

else:

  # ABを買い残りを単品で補う

  if X >= Y:

    # ABでYは賄える

    print((min(X*2*C, Y*2*C + A*(X-Y))))

  else:

    # ABでXは賄える

    print((min(Y*2*C, X*(2*C)+B*(Y-X))))

A, B, C, X, Y = list(map(int, input().split()))
# Cを買った個数とA、B単品で買った場合のコストを愚直に試す
total = 1 << 60
for i in range(10**5 + 1):
    cost = 2 * C * i + max(X - i, 0) * A + max(Y - i, 0) * B
    total = min(cost, total)
print(total)

A, B, C, X, Y = list(map(int, input().split()))
if (A + B) <= 2 * C:  # 単品だけで購入
    print((X * A + Y * B))
else:
    # ABを買い残りを単品で補う
    if X >= Y:
        # ABでYは賄える
        print((min(X * 2 * C, Y * 2 * C + A * (X - Y))))
    else:
        # ABでXは賄える
        print((min(Y * 2 * C, X * (2 * C) + B * (Y - X))))

-# Cを買った個数とA、B単品で買った場合のコストを愚直に試す

+    # ABを買い残りを単品で補う

+        # ABでYは賄える

+        # ABでXは賄える