Flower Bouquets for Youth#269

Flower Bouquets for Youth

1 second
128 megabytes
Very easy (≈850)

Since today is March 8th, you will prepare a flower bouquet. Your store has two types of flowers: white and red. Each bouquet should consist of 3 flowers and must include both types of flowers.

If your store has white flowers and red flowers, how many bouquets can you prepare at most?

#### Input

The only line contains two integers and (0 ≤ n, m ≤ 5 \cdot 10^5).

#### Output

Print the maximum number of bouquets you can prepare.

Examples

Example 1

Loading
Loading