| ||John and Brus have their own airplane. They are going to take several consecutive flights.
The i-th element of flights is the number of liters of fuel needed for the i-th flight.
The flights can be performed only in the same order as they are described in flights.
Initially there are fuel liters of fuel in the airplane. In order to perform a flight, the amount of fuel in the airplane must be at least as much as the amount of fuel needed for this flight. Return the maximum number of flights they will be able to make without a refuel.
|Method signature:||int find(int flights, int fuel)|
|(be sure your method is public)|
|-||flights will contain between 1 and 47 elements, inclusive.|
|-||Each element of flights will be between 1 and 1000, inclusive.|
|-||fuel will be between 1 and 1000, inclusive.|
|Exactly 10 liters of fuel are required to perform the first four flights.|
|These are the same flights as in the previous example, but in different order.|