You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.

There are $n$ doors, the $i$-th door initially has durability equal to $a_i$.

During your move you can try to break one of the doors. If you choose door $i$ and its current durability is $b_i$ then you reduce its durability to $max(0, b_i - x)$ (the value $x$ is given).

During Slavik's move he tries to repair one of the doors. If he chooses door $i$ and its current durability is $b_i$ then he increases its durability to $b_i + y$ (the value $y$ is given). Slavik cannot repair doors with current durability equal to $0$.

The game lasts $10^{100}$ turns. If some player cannot make his move then he has to skip it.

Your goal is to maximize the number of doors with durability equal to $0$ at the end of the game. You can assume that Slavik wants to minimize the number of such doors. What is the number of such doors in the end if you both play optimally?


-----Input-----

The first line of the input contains three integers $n$, $x$ and $y$ ($1 \le n \le 100$, $1 \le x, y \le 10^5$) — the number of doors, value $x$ and value $y$, respectively.

The second line of the input contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^5$), where $a_i$ is the initial durability of the $i$-th door.


-----Output-----

Print one integer — the number of doors with durability equal to $0$ at the end of the game, if you and Slavik both play optimally.


-----Examples-----
Input
6 3 2
2 3 1 3 4 2

Output
6

Input
5 3 3
1 2 4 2 3

Output
2

Input
5 5 6
1 2 6 10 3

Output
2



-----Note-----

Clarifications about the optimal strategy will be ignored.

Difficulty: introductory

Starter code:

Solutions:
from sys import stdin, stdout
from math import sin, tan, cos, pi, atan2, sqrt, acos, atan, factorial
from random import randint

n, x, y = map(int, stdin.readline().split())
values = list(map(int, stdin.readline().split()))

if x > y:
    stdout.write(str(n))
else:
    v = sum(map(lambda v: int(v <= x), values))
    stdout.write(str(v // 2 + (v & 1)))

n, x, y = map(int, input().split())
a = list(map(int, input().split()))
if (y - x >= 0):
    ans = 0
    for elem in a:
        if elem <= x:
            ans += 1
    print((ans + 1) // 2)
else:
    print(n)

n, x, y = map(int, input().split())
a = list(map(int, input().split()))
cnt = 0
if x > y:
    print(n)
else:
    for i in a:
        if i <= x:
            cnt += 1
    print(cnt // 2 + cnt % 2)

n,x,y = list(map(int,input().split()))
b = list(map(int,input().split()))
b.sort()
if x>y:
    print(n)
else:
    k = sum([1 for i in b if i<=x])
    print((k+(k%2==1))//2)



from math import ceil
n, x, y = list(map(int, input().split()))
mass = list(map(int, input().split()))
cnt = 0
if x>y:
    print(len(mass))
else:
    for i in mass:
        if i <= x:
            cnt += 1
    print(ceil(cnt/2))




from math import ceil

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

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

if x > y:
	print(n)

if x <= y:
	print(ceil(len(list([_ for _ in a if _ <= x])) / 2))


def main():
    arr=input().split()
    n=int(arr[0])
    x=int(arr[1])
    y=int(arr[2])
    if x<=y:
        arr=input().split()
        count=0
        for a in range(n):
            test=int(arr[a])
            if test<=x:
                count+=1
        if count%2==1:
            print(count//2+1)
        else:
            print(count//2)
    else:
        print(n)
main()


n,x,y=list(map(int,input().split()))
l1=list(map(int,input().split()))
count1=0
count2=0
for item in l1:
    if item<=x:
        count1+=1
        if item+y>x:
            count2+=1
if x>y:
    print(n)
elif x==y:
    if count1%2==0:
        print(count1//2)
    else :
        print(count1//2 +1)
else :
    total=0
    if count2%2==0:
        total+=count2//2
    else :
        total+=count2//2 +1
    print(total+(count1-count2))
    


from bisect import bisect_right
n, x, y = list(map(int, input().split()))
line = sorted(list(map(int, input().split())))

if x > y:
    print(n)
else:
    k = bisect_right(line, x)
    print(k//2 + k % 2)


n, x, y = list(map(int, input().split()))
a = list(map(int, input().split()))
if x > y:
    print(n)
else:
    b = 0
    for i in a:
        if i <= x:
            b += 1
    if b % 2:
        print(b // 2 + 1)
    else:
        print(b // 2)


import sys

line = sys.stdin.readline().strip().split()
n = int(line[0])
x = int(line[1])
y = int(line[2])
a = list(map(int, sys.stdin.readline().strip().split()))
d = len(a)
s = []

if x > y:
    print(d)
else:
    j = 0
    for i in a:
        if i <= x:
            j = j + 1
    if j % 2 == 0:
        print(j // 2)
    else:
        print(j // 2 + 1)

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

if x > y:
    print(n)
else:
    a.sort()
    i = 0
    while i < n and a[i] <= x:
        i += 1
    print(i // 2 + i % 2)


n, x, y = map(int, input().split())
ar = list(map(int, input().split()))
if x > y:
    print(n)
else:
    num = 1
    for i in ar:
        if i <= x:
            num += 1
    print(num // 2)

# cook your dish here
for _ in range(1):
    n,x,y = map(int,input().split())
    a = list(map(int,input().split()))
    if x>y:
        print(n)
    else:
        c=0
        for val in a:
            if val <= x:
               c+=1 
        print((c+1)//2)

import random


def ii():
    return int(input())


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


def li():
    return list(mi())

n,x,y = tuple(mi())
a = li()
random.shuffle(a)
a = sorted(a)
c1 = 0
c2 = 0
for i in a:
    if i <= x:
        c1 += 1
    if i <=y:
        c2 +=1
ans = 0
if x<=y:
    ans = (c1+1) // 2
else:
    ans = n
print(ans)





def read(type = 1):
    if type:
        file = open("input.dat", "r")
        line = int(file.readline())
        file.close()
    else:
        line = list(map(int, input().strip().split()))
        n = line[0]
        x = line[1]
        y = line[2]
        line = list(map(int, input().strip().split()))
    return n, x, y, sorted(line, reverse=True)


def solve():
    sol = 0
    for i in range(len(a)):
        if a[len(a)-1-i] + y > x:
            pos = len(a)-1-i
            pos = len(a)-1-i
            break
    for i in range(len(a)):
        if a[i] <= x:
            sol += 1
            a[pos] += y
            pos -= 1
    if x > y:
        return n
    else:
        return sol


n, x, y, a = read(0)
sol = solve()
print(sol)

import sys
input = sys.stdin.readline

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

if x>y:
    print(n)
else:
    count=0
    for a in A:
        if a<=x:
            count+=1

    print((count+1)//2)
        


import sys
import math
amount, x, y = [int(s) for s in input().split()]
array = [int(s) for s in input().split()]
counter = 0
if x > y:
    print(amount)
    return
else:
    for i in range(len(array)):
        if array[i] - x <= 0:
            counter += 1
print(math.ceil(counter / 2))

n, x, y = list(map(int, input().split()))
a = [int(e) for e in input().split()]
if x > y:
    print(n)
    return
cnt = 0
for i in a:
    if i <= x:
        cnt += 1
print((cnt + 1) // 2)


n,x,y=map(int,input().split())
arr=list(map(int,input().split()))
if x<=y:
	c=0
	arr=sorted(arr)
	for i in range(0,len(arr),2):
		if arr[i]<=x:
			c+=1
	print(c)
	return
# if x==y:
# 	c=0
# 	for i in range(0,len(arr)):
# 		if arr[i]<=x:
# 			c+=1
# 	print(c//2)
# 	return
if x>y:
	c=0
	print(n)

n, x, y = map(int, input().split())
a = [int(j) for j in input().split()]
nLX = 0
for e in a:
    if e <= x:
        nLX += 1
if y >= x:
    print((nLX + 1) // 2)
else:
    print(n)

n,x,y=map(int,input().split())
a=list(map(int,input().split()))
ans=0
if y<x:
    print(n)
else:
    for i in range(n):
        if a[i]<=x:
            ans+=1
    print((ans+1)//2)

def mi():
    return list(map(int, input().split()))
'''
6 3 2
2 3 1 3 4 2
'''
n,x,y = mi()
a = list(mi())

from math import ceil
le = 0
for i in a:
    if i<=x:
        le+=1
if y>=x:
    print(ceil(le/2))
else:
    print (n)


import math
n, x, y = list(map(int, input().split()))
a = [int(x) for x in input().split()]
if x > y:
    print(n)
else:
    counter = 0
    for i in a:
        if x >= i:
            counter += 1
    print(math.ceil(counter/2))


n,x,y = list(map(int, input().split()))
m = list(map(int, input().split()))
if(x>y):
    print(n)
else:
    s = 0
    for i in range(n):
        if(m[i]<=x):
            s+=1
    print((s+1)//2)