Woburn Challenge 2017-18 Round 2 - Junior Division

The evil wizard Saruman is breeding himself an army of fearsome Uruk-hai
soldiers. Each Uruk-hai can be created out of
Saruman has at his disposal
What's the maximum number of Uruk-hai that Saruman can create without exceeding his resources?
Input Specification
The first line of input consists of three space-separated integers,
The next line consists of three space-separated integers,
Output Specification
Output a single integer, the maximum number of Uruk-hai that can be created.
Sample Input
Copy
1 4 3
8 14 10
Sample Output
Copy
3
Sample Explanation
Creating
Comments