InterviewBit Academy is now Scaler!
InterviewBit Academy is now Scaler Academy!

Make it

Given two integers A and B. A represents the count of mangoes and B represent the count of slices of mangoes.
Mango can be cut into three slices of mangoes. A glass of mango shake can be formed by two slices of mangoes.

Find the maximum number of glasses of mango shakes you can make with A mangoes and B slices of mangoes initially.

Input Format

The First argument is an integer A.
The Second argument is an integer B.

Output Format

Return the maximum number of glasses of mango shakes you can make.


0 <= A, B <= 10^8

For Example

Input 1:
    A = 19
    B = 0
Output 1:

Input 2:
    A = 7
    B = 1
Output 2:
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Start solving Make it on Interview Code Editor
Sign Up
to access hints and editorial solutions for Make it


Click here to start solving coding interview questions