Harryxun/stf_run huggingface dataset:
N,Y = map(int, input().split())


a = Y//10000
b = Y//5000

flag = False

for i in range(a+1):
    if flag == True:
        break
    for j in range(b+1):
        if N-i-j<0:
            break:
        if i*10000+j*5000+(N-i-j)*1000 == Y:
            flag = True
            s = i
            t = j
            u = N-i-j
            break

if flag == True:
    print(s,t,u)
else:
    print(-1,-1,-1)

### FIXED CODE ###

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


a = Y//10000
b = Y//5000

flag = False

for i in range(a+1):
    if flag == True:
        break
    for j in range(b+1):
        if N-i-j<0:
            break
        if i*10000+j*5000+(N-i-j)*1000 == Y:
            flag = True
            s = i
            t = j
            u = N-i-j
            break

if flag == True:
    print(s,t,u)
else:
    print(-1,-1,-1)
def bin_tree( pri , li_pri , len_li ):
    #pri: どこに入れていいかわからない値段
    #li_pri: 値段のリスト(昇順)
    #len_li: リストの長さ
    lo = 0
    hi = len_li - 1
    while hi - lo > 1:
        mid = (lo + hi) // 2
        guess = li_pri[mid]
        if guess == pri:
            hi = mid
        if guess > pri:
            hi = mid
        else:
            lo = mid
    return lo

I = input().split()
N = int(I[0])
M = int(I[1])
# N: 品物の数
# M: 割引券の数
# A: 品物の値段行列
A = list(map(int , input().split()))
A.sort()

print(A)

while M > 0:
    M -= 1
    pri = A.pop( N - 1 )
    pri = pri // 2
    if ( pri < A[0] ):
        ans = 0
    else :
        ans = bin_tree( pri , A , N - 1 ) + 1
    A[ans:ans] = [pri]

    print(A)
    

F_pri = 0
for i in range(N):
    F_pri += A[i]
print(F_pri)

### FIXED CODE ###

def bin_tree( pri , li_pri , len_li ):
    #pri: どこに入れていいかわからない値段
    #li_pri: 値段のリスト(昇順)
    #len_li: リストの長さ
    lo = 0
    hi = len_li - 1
    while hi - lo > 1:
        mid = lo + (hi - lo) // 2
        guess = li_pri[mid]
        if guess >= pri:
            hi = mid
        else:
            lo = mid
    return lo

I = input().split()
N = int(I[0])
M = int(I[1])
# N: 品物の数
# M: 割引券の数
# A: 品物の値段行列
A = list(map(int , input().split()))
A.sort()

while M > 0:
    M -= 1
    pri = A.pop( N - 1 )
    pri = pri // 2
    if len(A) == 0:
        ans = 0
    elif (pri < A[0] ):
        ans = 0
    else:
        ans = bin_tree( pri , A , N - 1 ) + 1
    # ans: pri以上となる値段のうち最小のインデックス
    A[ans:ans] = [pri]    

F_pri = 0
for i in range(N):
    F_pri += A[i]
print(F_pri)
def dfs(i, f):
    if i == len(s) - 1:
        return sum(list(map(int, f.split("+")))) 
    return dfs(i + 1, f + s[i + 1]) + \ dfs(i + 1, f + "+" + s[i + 1])

s = input()
print(dfs(0, s[0]))

### FIXED CODE ###

def dfs(i, f):
    if i == len(s) - 1:
        return sum(list(map(int, f.split("+")))) 
    return dfs(i + 1, f + s[i + 1]) + \
           dfs(i + 1, f + "+" + s[i + 1])
 
s = input()
print(dfs(0, s[0]))
a,b=map(int,input().split())
if a + b <=10:
  rint(a+b)
else:
  print("error")

### FIXED CODE ###

a,b=map(int,input().split())
if a + b <10:
  print(a+b)
else:
  print("error")
gt

### FIXED CODE ###

n,m,c=map(int,input().split())
B=list(map(int,input().split()))
A=[list(map(int,input().split()))for i in range(n)] #二次元配列でとっています
cnt=0
for i in range(n):
    total=0
    for j in range(m):
        total+=B[j]*A[i][j]
    total+=c
    if 0<total:
        cnt+=1
print(cnt)
n,m=map(int, input().split())  #複数数値入力

list_a = []
for i in range(m):
    list_a.append(int(input()))
    
def countWays_memo(n):
    memo = [-1]*(n+1)
    def _countWays(n):
        if n < 0:
            return 0
        elif n == 0:
            return 1
        else:
            if memo[n] > -1:
                return memo[n]
            else:
                memo[n] = _countWays(n-1) + _countWays(n-2) 
                return memo[n]
    return _countWays(n)

steps = [list_a[0]]
now_step=list_a[0]+1
for i in range(len(list_a)-1):
    steps.append(list_a[i+1]-now_step)
    now_step = list_a[i+1]+1
steps.append(n-now_step+1)


dict_steps = {}
for s in set(steps):
    dict_steps[s] = steps.count(s)

ans = 1
for k,v in dict_steps.items():
    ans *= countWays_memo(k-1)**v
    
print(ans% 1000000007)

### FIXED CODE ###

n,m=map(int, input().split())  #複数数値入力

import sys

sys.setrecursionlimit(10**9)

def countWays_memo(n):
    memo = [-1]*(n+1)
    def _countWays(n):
        if n < 0:
            return 0
        elif n == 0:
            return 1
        else:
            if memo[n] > -1:
                return memo[n]
            else:
                memo[n] = _countWays(n-1) + _countWays(n-2) 
                return memo[n]
    return _countWays(n)
    
if m == 0:
    print(countWays_memo(n)% 1000000007)
else:
    list_a = []
    for i in range(m):
        list_a.append(int(input()))

    steps = [list_a[0]]
    now_step=list_a[0]+1
    for i in range(len(list_a)-1):
        steps.append(list_a[i+1]-now_step)
        now_step = list_a[i+1]+1
    steps.append(n-now_step+1)


    dict_steps = {}
    for s in set(steps):
        dict_steps[s] = steps.count(s)

    ans = 1
    for k,v in dict_steps.items():
        ans *= countWays_memo(k-1)**v

    print(ans% 1000000007)
h,w = map(int, input().split())
s = [list(input()) for i in range(w)]
dx = [0,1,0,-1]
dy = [1,0,-1,0]

for x in range(h):
    for y in range(w):
        if s[x][y] == "#":
            flag = False

            for i in range(4):
                nx = x + dx[i]
                ny = y + dy[i]
                if 0 <= nx < h and 0 <= ny < w and s[nx][ny] == "#":
                    flag = True

            if not flag:
                print("No")
                exit()

print("Yes")

### FIXED CODE ###

h,w = map(int, input().split())
s = [list(input()) for i in range(h)]
dx = [0,1,0,-1]
dy = [1,0,-1,0]

for x in range(h):
    for y in range(w):
        if s[x][y] == "#":
            flag = False

            for i in range(4):
                nx = x + dx[i]
                ny = y + dy[i]

                if 0 <= nx < h and 0 <= ny < w and s[nx][ny] == "#":
                    flag = True

            if not flag:
                print("No")
                exit()

print("Yes")
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict
import copy

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N, K = getlist()
	A = getlist()
	B = copy.copy(A)
	num = 0
	n = K.bit_length()
	numL = [0] * 35
	for i in range(N):
		for j in range(35):
			if B[i] & 1 == 1:
				numL[j] += 1
			B[i] = B[i] >> 1
			if B[i] == 0:
				break
	for i in range(n):
		if 2 * numL[i] < N:
			num += 2 ** i
	ans = 0
	for i in range(N):
		ans += num ^ A[i]
	print(ans)

if __name__ == '__main__':
	main()

### FIXED CODE ###

#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N, K = getlist()
	A = getlist()
	if K == 0:
		print(sum(A))
		sys.exit()	
	dp = [0] * 41
	j = 0
	while True:
		if K % 2 == 1:
			dp[-1 - j] = 1
		K = K // 2
		if K == 0:
			break
		j += 1
	#print(dp)

	p1 = [0] * 41
	p0 = [N] * 41
	for i in range(N):
		a = A[i]
		j = 0
		while True:
			if a % 2 == 1:
				p1[-1 - j] += 1
			a = a // 2
			if a == 0:
				break
			j += 1
	for i in range(41):
		p0[i] -= p1[i]
	#print(p1)
	#print(p0)

	#DP
	DP0 = [0] * 41
	DP1 = [0] * 41
	s = dp.index(1)
	DP0[0] = (2 ** 40) * p1[0]
	DP1[0] = (2 ** 40) * p1[0]
	for i in range(1, s):
		DP0[i] += DP0[i - 1] + (2 ** (40 - i)) * p1[i]
		DP1[i] += DP1[i - 1] + (2 ** (40 - i)) * p1[i]
	if s != 0:
		DP0[s] = DP0[s - 1] + (2 ** (40 - s)) * p0[s]
		DP1[s] = DP1[s - 1] + (2 ** (40 - s)) * p1[s]
	else:
		DP0[s] = (2 ** (40 - s)) * p0[s]
		DP1[s] = (2 ** (40 - s)) * p1[s]
	for i in range(s + 1, 41):
		if dp[i] == 1:
			DP0[i] = DP0[i - 1] + (2 ** (40 - i)) * p0[i]
			DP1[i] = max(DP1[i - 1] + (2 ** (40 - i)) * max(p0[i], p1[i]), DP0[i - 1] + (2 ** (40 - i)) * p1[i])
		else:
			DP0[i] = DP0[i - 1] + (2 ** (40 - i)) * p1[i]
			DP1[i] = DP1[i - 1] + (2 ** (40 - i)) * max(p0[i], p1[i])
	# print(DP0)
	# print(DP1)
	print(max(DP0[-1], DP1[-1]))

if __name__ == '__main__':
	main()
old_list = list(map(int, input().split()))
n = old_list.sort()

print(n[3]-n[0])

### FIXED CODE ###

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

print(max(list)-min(list))
mport fractions
A,B = map(int, input().split())
C = fractions.gcd(A, B)
counter = 1

for i in range(C):
  if i==0:
    continue
  if C%(i+1) == 0:
    j = 2
    whileFin = i+1
    while True:
      if j > whileFin or i+1 == 2:
        counter += 1
        break
      if (i+1)%j == 0:
        break
      else:
        whileFin = int((i+1)/(j+1)) + 1
      j += 1

print(counter)

### FIXED CODE ###

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    return arr

a, b = map(int, input().split())
fa = factorization(a)
fb = factorization(b)

i = 0
j = 0
cnt = 1
while i < len(fa) and j < len(fb):
  if fa[i][0] == fb[j][0]:
    cnt += 1
    i += 1
    j += 1
  elif fa[i][0] < fb[j][0]:
    i += 1
  else:
    j += 1

print(cnt)
n = int(input())

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

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

h = list(map(lambda i, x: (t - x * 0.006, i), enumerate(h)))

h.sort()

print(h[0][1] + 1)

### FIXED CODE ###

n = int(input())

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

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

h = list(map(lambda x: (abs(a - (t - x[1] * 0.006)), x[0]), enumerate(h)))

h.sort()

print(h[0][1] + 1)
N = int(input())
ls = []
for i in range(N):
  x,y,h = map(int, input().split())
  ls += [(h,x,y)]
ls.sort(key=lambda x:x[2])
px, py, ph = ls[-1]

ans = []
for i in range(101):
  for j in range(101):
    pH = ph+abs(px-i)+abs(py-j)
    for l in ls:
      h, x, y = l
      u = pmax(H - abs(x-i) - abs(y-j), 0)
      if not u==h:
        break
    else:
      ans = (i,j,pH)
      break
  if ans:
    break
print(*ans)

### FIXED CODE ###

N = int(input())
ls = []
for i in range(N):
  x,y,h = map(int, input().split())
  ls += [(x,y,h)]
ls.sort(key=lambda x:x[2])
px, py, ph = ls[-1]

ans = []
flag = False
for i in range(101):
  for j in range(101):
    H = ph+abs(px-i)+abs(py-j)
    for l in ls:
      x, y, h = l
      u = max(H - abs(x-i) - abs(y-j), 0)
      if not u==h:
        break
    else:
      ans = (i,j,H)
      flag = True
      break
  if flag:
    break
print(*ans)
S = input()
K = int(input())
L = len(S)
a = S[0]
i = 0
C = []
while i < L-1:
    count = 1
    b,c = S[i],S[i+1]
    i+= 1
    while b == c:
        count += 1
        if i == L-1:
            break
        b,c = S[i],S[i+1]
        i += 1
    C.append(count)
if a != S[L-1]:
    num = 0
    for co in C:
        num += co//2
    print(int(num*K))
else:
    num1 = 0
    for co in C:
        num1 += co//2
    num2 = (C[len(C)-1]+1)//2
    for co in C[:len(C)-1]:
        num2 += co//2
    print(int(num1+num2*(K-1)))

### FIXED CODE ###

S = input()
K = int(input())
L = len(S)
a = S[0]
i = 0
C = []
if L == 1:
    C = [1]
while i < L-1:
    count = 1
    b,c = S[i],S[i+1]
    i+= 1
    while b == c:
        count += 1
        if i == L-1:
            break
        b,c = S[i],S[i+1]
        i += 1
    C.append(count)
if a != S[L-1]:
    num = 0
    for co in C:
        num += co//2
    ans = int(num*K)
else:
    if len(C) == 1:
        ans  = L*K//2
    else:
        num1 = 0
        for co in C:
            num1 += co//2
        num2 = (C[len(C)-1]+C[0])//2
        for co in C[1:len(C)-1]:
            num2 += co//2
        ans = int(num1+num2*(K-1))
print(ans)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N=int(input())
T=input().split()
X=[]
for i in range(int(input())):
    X.append(input().split()[1])
    
T=list(map(int,T))
X=list(map(int,X))
for y in range(len(X)):
    T[y]=X[y]
    print(sum(T))
    

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

i = input().split()
if i[1] == '+':
    print(int(i[0])+int(i[2]))
if i[1] == '-':
    print(int(i[0])-int(i[2]))
N=input()
M=input()
N=list(str(N))
M=list(str(M))
ans=[]
for i in range(len(N)):
  ans.append(N[i])
  ans.append(M[i])
print("".join(ans))


### FIXED CODE ###

N=input()
M=input()
N=list(str(N))
M=list(str(M))
ans=[]
if len(N)>len(M):
  for i in range(len(N)-1):
    ans.append(N[i])
    ans.append(M[i])
  ans.append(N[-1])
else:
  for i in range(len(N)):
    ans.append(N[i])
    ans.append(M[i])
print("".join(ans))
G = int(input())
A, B = map(int,input().split())
Total = 'OK'
for i in range(A,B+1):
    if i% G != 0:
        Total = 'NG'
print(Total)

### FIXED CODE ###

X = int(input())
Amount = 100
Year = 0
while Amount < X:
    P = Amount * 0.01
    if P >= 1:
        Amount+= int(P)
        Year+=1
print(Year)
n = int(input())
A = list(map(int, input().split()))

for i in range(n):
    for j in range(n):
        if i == j:
            continue
        if A[i] % A[j] == 0:
            break
    else:
        ans += 1

print(ans)



### FIXED CODE ###

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

dp = [0] * (10**6+1)

for a in A:
    dp[a] += 1

for i in range(1, len(dp)):
    if dp[i]:
        for j in range(i+i, len(dp), i):
            dp[j] = 0
print(dp.count(1))
s = list(input())
acgt = ['A', 'C', 'G', 'T']
cnt, ans = 0
for i in range(len(s)):
  if s[i] in acgt:
    cnt += 1
    if ans <= cnt:
      ans = cnt
  else:
    cnt = 0
print(ans)


### FIXED CODE ###

s = list(input())
acgt = ["A", "C", "G", "T"]
cnt = 0
ans = 0
for i in range(len(s)):
  if s[i] in acgt:
    cnt += 1
    if (ans < cnt):
      ans = cnt
  else:
    cnt = 0
print(ans)
#!/usr/bin/env python3
import sys
try:
    from typing import Dict, List
except ImportError:
    pass


def solve(N: int, M: int, A: "List[int]"):
    mn = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6]
    A.sort(reverse=True)
    dp = [-1] * (N + 1)
    dp[0] = 0
    for i in range(1, N + 1):
        m = -1
        for Ai in A:
            if i - mn[Ai] >= 0 and dp[i - mn[Ai]] >= 0:
                m = max(m, dp[i - mn[Ai]] + 1)
        if m >= 0:
            dp[i] = m
    assert dp[N] >= 0
    k = N
    res = []  # type: List[int]
    while dp[k]:
        for Ai in A:
            if dp[k - mn[Ai]] == dp[k] - 1:
                res.append(Ai)
                k -= mn[Ai]
                break

    print("".join(str(d) for d in res))


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
    M = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(M)]  # type: "List[int]"
    solve(N, M, A)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
try:
    from typing import Dict, List
except ImportError:
    pass


def solve(N: int, M: int, A: "List[int]"):
    mn = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6]
    A.sort(reverse=True)
    dp = [-1] * (N + 1)
    dp[0] = 0
    for i in range(1, N + 1):
        m = -1
        for Ai in A:
            if i - mn[Ai] >= 0 and dp[i - mn[Ai]] >= 0:
                m = max(m, dp[i - mn[Ai]] + 1)
        if m >= 0:
            dp[i] = m
    assert dp[N] >= 0
    k = N
    res = []  # type: List[int]
    while dp[k]:
        for Ai in A:
            if k - mn[Ai] >= 0 and dp[k - mn[Ai]] == dp[k] - 1:
                res.append(Ai)
                k -= mn[Ai]
                break

    print("".join(str(d) for d in res))


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
    M = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(M)]  # type: "List[int]"
    solve(N, M, A)


if __name__ == '__main__':
    main()
a, b, n = map(int, input().split())
if b == 1:
  print(0)
  exit()
x = min(b-1, n)
print(floor(a*x/b) - a * floor(x/b))

### FIXED CODE ###

from math import floor
a, b, n = map(int, input().split())
if b == 1:
	print(0)
else:
	x = min(b-1, n)
	print(floor(a*x/b) - a * floor(x/b))
import math

d = list(map(int,input().split(' ')))
N = d[0]
X = d[1]
min_m = 0

n = int(input())
for i in range(n):
	mi = input()
	X = X - mi
	if min_m == 0 or min_m > mi:
		min_m = mi

print(N + math.floor(X/mi))

### FIXED CODE ###

import math

d = list(map(int,input().split(' ')))
N = d[0]
X = d[1]
min_m = 0

for i in range(N):
	mi = int(input())
	X = X - mi
	if min_m == 0 or min_m > mi:
		min_m = mi

print(N + math.floor(X/min_m))
p=print
r=range
def a(i,j,k,l=0):p("+<"[l],i,j,k)
def b(i):a(i,i,i+1)
def d(x,i):
	a(x,3,x)
	for t in r(30):b(p:=i+t+30);a(q:=p+1,n,q);[*map(b,r(q,v:=i+60))];a(v,x,i+t,1);b(p);a(q,i+t,q)
p(3934)
a(0,1,3)
a(2,3,3,1)
a(1,3,1)
d(0,9)
d(1,50)
for t in r(60):a(2,2,2);[t-31<s<30!=(a(8+t-s,50+s,5),a(3,5,6,1),a(2,6,2))for s in r(t)]

### FIXED CODE ###

n=97
r=range
L='<'
P='+'
l=[3933,P,0,1,n,L,2,n,n,P,0,n,3,P,1,n,4]
a=lambda i,j:[P,i,j,i]
b=lambda i:[P,i,i,i+1]
def d(x,i,j):
	return sum([sum([b(j+t-1),a(j+t,n),*(b(s)for s in r(j+t,j+29)),[L,j+29,x,i+t],b(j+t-1),a(j+t,i+t)],[])for t in r(30)],[])
l+=d(3,5,36)
l+=d(4,36,67)
for t in r(59):
	l+=a(2,2)
	for s in r(t+1):
		if t-30<s<30:l+=[P,5+t-s,36+s,98];l+=[L,n,98,99];l+=a(2,99)
print(*l)
from collections import deque
A, B = [int(x) for x in input().split()]

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

t = gcd(A, B)
l = deque([1])
sqrt_t = t ** 0.5 + 1
for  i in range(2, sqrt_t + 1):
  if t % i == 0:
    l.append(i)
    while t % i == 0:
      t //= i
print(len(set(l)))


### FIXED CODE ###

from collections import deque
A, B = [int(x) for x in input().split()]

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

t = gcd(A, B)
l = deque([1])
sqrt_t = int(t ** 0.5) + 1
for i in range(2, sqrt_t + 1):
  if t % i == 0:
    l.append(i)
    while t % i == 0:
      t //= i
      
l.append(t)
print(len(set(l)))
cnt=0
mcnt=0
for i in range(N-1):
    if H[i]>=H[i+1]:
        cnt+=1
        if mcnt<cnt:
            mcnt=cnt
    else:
        cnt=0

### FIXED CODE ###

N=int(input())
H=list(map(int, input().split()))
cnt=0
mcnt=0
for i in range(N-1):
    if H[i]>=H[i+1]:
        cnt+=1
        if mcnt<cnt:
            mcnt=cnt
    else:
        cnt=0
print(mcnt)
import collections
N = int(input())
S_list = [input() for i in range(N)]
c = collections.Counter(S_list)
l = {}
m = c[0][0]
for x, y in zip(*c):
  if x in l.keys():
    l[x] = [y]
  else:
    l[x].append(y)

  
for y in sorted(l[m]):
  print(y)

### FIXED CODE ###

N = int(input())

value_dict = {}

for x in range(N):
    value = input()
    if value not in value_dict.keys():
        value_dict[value] = 1
        continue
    value_dict[value] += 1

max_count = max(value_dict.values())
max_values = [k for k, v in value_dict.items() if v == max_count]
max_values.sort()


print("\n".join(max_values))
n, m = map(int, raw_input().split())
A = [int(raw_input()) for i in range(m)]
def solve(n, A):
  dp = [0] * (n + 1)
  ai = 0
  if ai < len(A) and A[ai] == 1:
    dp[1] = -1
    ai += 1
  else:
    dp[1] = 1
  if ai < len(A) and A[ai] == 2:
    dp[2] = -1
    ai += 1
  elif dp[1] != -1:
    dp[2] = 2
  else:
    dp[2] = 1
  for i in range(3, n + 1):
    if ai < len(A) and A[ai] == i:
      dp[i] = -1
      ai += 1
      continue
    if dp[i-2] != -1:
      dp[i] = dp[i-2] 
    if dp[i-1] != -1:
      dp[i] += dp[i-1]
  return dp[n] % (10**9+7)
print solve(n, A)

### FIXED CODE ###

n, m = map(int, raw_input().split())

def solve(n, m):
    dp = [0] * (n + 1)
    ai = 0
    a = -1
    dp[0] = 1
    if ai < m:
        a = int(raw_input())
    if a == 1:
        ai += 1
        if ai < m:
            a = int(raw_input())
        dp[1] = -1
    else:
        dp[1] = 1

    for i in range(2, n+1):
        if i == a:
            ai += 1
            if ai < m:
                a = int(raw_input())
            dp[i] = -1
        else:
            if dp[i-2] != -1:
                dp[i] = dp[i-2]
            if dp[i-1] != -1:
                dp[i] += dp[i-1]
    return dp[n] % (10**9+7)
print solve(n, m)
def eat(L,X):
    if L == 0: return 1
    if X == 1: return 0
    elif X <= len_burger(L-1)+1: return eat(L-1,X-1)
    elif X == len_burger(L-1)+2: return num_ban(L-1)+1
    elif X < 2*len_burger(L-1)+3: return num_ban(L-1)+1+eat(L-1,X-len_burger(L-1)-2)
    elif X == len_burger(L): return num_ban(L)

def solve():
    N,X = [int(s) for s in input().split() if s]
    
    print(eat(N,X))

solve()

### FIXED CODE ###

def len_burger(L):
    return 2**(L+2)-3
def num_ban(L):
    return 2**(L+1)-1

def eat(L,X):
    if L == 0: return 1
    if X == 1: return 0
    elif X <= len_burger(L-1)+1: return eat(L-1,X-1)
    elif X == len_burger(L-1)+2: return num_ban(L-1)+1
    elif X < 2*len_burger(L-1)+3: return num_ban(L-1)+1+eat(L-1,X-len_burger(L-1)-2)
    elif X == len_burger(L): return num_ban(L)

def solve():
    N,X = [int(s) for s in input().split() if s]
    
    print(eat(N,X))
    
solve()
N = int(input())
Ps = list(map(int, input().split()))
count = 0
low = -1

for i in range(N):
    low = Ps[i]

    if ( sum(x < low for x in Ps[:i]) == 0):
        count += 1

print(count)

### FIXED CODE ###

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

if (N==M):
    print('Yes')
else :
    print('No')
N = int(input())
total = 0
for i in range(1,N+1):
    if digits%2 != 0:
        total += 1
print(total)        
    



### FIXED CODE ###

N = int(input())
total = 0
for i in range(1,N+1):
    if len(str(i))%2 != 0:
        total += 1
print(total)
import math


def get_prime_factorized(N):
    R = []
    b, e = 2, 0
    while b ** 2 <= N:
        while N % b == 0:
            N  = N // b
            e += 1
        if e > 0:
            R.append([b, e])
        b, e = b + 1, 0
    if N > 1:
        R.append([N, 1])
    return R


N = int(input())

L = [l[1]+1 for l in get_prime_factorized(math.factorial(N))]

for i, l in enumerate(L):
    if i  == 0:
        R  = l
    else:
        R *= l

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


### FIXED CODE ###

def get_prime_factorized(N):
    R = []
    b, e = 2, 0
    while b ** 2 <= N:
        while N % b == 0:
            N  = N // b
            e += 1
        if e > 0:
            R.append([b, e])
        b, e = b + 1, 0
    if N > 1:
        R.append([N, 1])
    return R


N = int(input())
H = {}
R = 1

for n in range(1, N+1):
    for l in get_prime_factorized(n):
        k, c = l
        if k in H.keys():
            H[k] += c
        else:
            H[k]  = c

for k in H.keys():
    R *= (H[k]+1)
    R %= 10**9+7

print(R)
N = int(input())

if N == 1:
  print(1)
elif N % 2 == 0:
  print(0.5)
else:
  print((N - (N//2) / N)


### FIXED CODE ###

N = int(input())

if N == 1:
  print(1)
elif N % 2 == 0:
  print(0.5)
else:
  print(-(-N//2) / N)
X,Y = map(int, intput().split())
print("{}".format(X+(Y/2)))

### FIXED CODE ###

x,y = map(int,input().split())
print('{}'.format(int(x+(y/2))))
n=int(input())
a=list(map(int,input().split()))
step=0
for i in range(n-1):
  if a[i]>a[i+1]:
    humi+=a[i]-a[i+1]
    a[i+1]=a[i]
print(step)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
step=0
for i in range(n-1):
  if a[i]>a[i+1]:
    step+=a[i]-a[i+1]
    a[i+1]=a[i]
print(step)
a, b, c = input().split()
print(a[0].upper + b[0].upper, c[0].upper)

### FIXED CODE ###

a, b, c = input().split()
print(a[0].upper() + b[0].upper() + c[0].upper())
n, a, b = map(int, raw_input().split())
if n == 1:
    print("Hello World")
elif n == 2:
    print a + b

### FIXED CODE ###

N = input()
if N == 1:
    print "Hello World"
else:
    A = input()
    B = input()
    print A+B