Hide

Problem B
Shandy

Languages da de en
/problems/shandy/file/statement/en/img-0001.png

A shandy is a 50:50 mixture of beer (or cider) and lemonade (or some other nonalcoholic lemon- or lime-flavoured beverage, possibly carbonated.) This results in a drink of lower alcohol per volume that still retains the experience of having a beer. Shandies are popular around the world and known by many names, such as Radler or Panaché. In some jurisdictions, the low alcohol content of shandies exempts them from laws governing the sale of alcoholic beverages.

One bottle of beer and one bottle of lemonade make exactly two shandies. How many whole shandies can you pour?

Input

Input consists of exactly two lines. The first line contains the number $B$ of bottles of beer. The second line contains the number $L$ of bottles of lemonade. We have both $0\leq B\leq 100$ and $0\leq L\leq 100$.

Output

Print the number of shandies you can serve.

Sample Input 1 Sample Output 1
1
1
2
Sample Input 2 Sample Output 2
2
1
2
Sample Input 3 Sample Output 3
2
0
0
Sample Input 4 Sample Output 4
61
25
50

Please log in to submit a solution to this problem

Log in