eolymp
bolt
Try our new interface for solving problems

Juice

In building C of ADA University, one prepares a very tasty and healthy multivitamin juice. One dose of juice requires $a$ apples, $b$ pears, and $c$ oranges. However, there is bad luck --- you must bring the fruits for juice with you! Huseyn likes multivitamin juice very much. He currently has $x$ apples, $y$ pears, and $z$ oranges. What is the maximum number of juice doses he can order? \InputFile The first line contains three integers $a, b$, and $c$. The second line contains three integers $x, y$, and $z$. All numbers are non-negative integers not greater than $10^9$. \OutputFile Print the largest number of juice doses that Huseyn can order.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1 2 6
3 8 15
Output example #1
2
Author Mykhailo Medvediev