unittest
{
	assert( [ "4 5 3", "8", "7", "4", "2" ].parse.expand.solve == 2 );
	assert( [ "2 10 4", "20", "20" ].parse.expand.solve == 4 );
	assert( [ "5 2 1", "900000000", "900000000", "1000000000", "1000000000", "1000000000" ].parse.expand.solve == 800000000 );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto nab = input.front.split.to!( long[] );
	auto hs = new long[ nab[ 0 ] ];
	foreach( ref h; hs )
	{
		input.popFront;
		h = input.front.to!( long );
	}
	return tuple( nab[ 1 ], nab[ 2 ], hs );
}

auto solve( long a, long b, long[] hs )
{
	// aはbとの差分にしておくと後が楽
	a -= b;
	
	// 爆発回数を二分探索する
	auto hs_s = hs.sort;
	auto l = 0L;
	auto r = ( hs.back + b - 1 ) / b;
	while( l < r )
	{
		// 爆発回数を仮定して、爆発回数*bで倒しきれなかった魔物を爆発回数*aで倒しきれるかを判定
		auto bc = ( l + r ) / 2;
		auto bt = b * bc;
		auto ac = 0L;
		foreach( h; hs_s.upperBound( bt ) )
		{
			ac += ( h - bt + a - 1 ) / a;
			if( bc < ac ) break;
		}
		if( bc < ac ) l = bc + 1;
		else          r = bc;
	}
	return l;
}
