King of cans

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

The informatics student Lisa at the University of Bergen, Norway, has spent way too much money. To make up for it, she has decided to recycle the empty cans she found in the reading hall. Since Lisa have been in Norway for a while now, she knows that the Norwegian government has a deposit-refund scheme to encourage recycling of soda bottles: when buying a bottle, the store will collect an extra 22 or 33 Norwegian kroner in deposit –- depending on bottle size –- for each soda bottle you buy. If someone returns an empty bottle to the store to be recycled, the deposit will be refunded to the redeemer. Hence, if Lisa manage to find a couple of hundred bottles left behind by wasteful students, it can quickly become surprisingly much money.

As an informatics student, Lisa naturally has some tendencies of OCD and today it kicks in hard. She will not take any receipt not being exactly 100100 Norwegian kroner after recycling the soda. The question is this: what is the maximum amount of receipts equaling exactly 100100 Norwegian kroner Lisa can get?

입력

The first and only line have two space-separated integers xx and yy, where 0x1040 \leq x \leq 10^{4} is the number of bottles whose deposit worth is 22 Norwegian kroner, and 0y1040 \leq y \leq 10^{4} is the number of bottles whose deposit is worth 33 Norwegian kroner.

출력

Your program should output a single integer, the maximum number of refund receipts Lisa can get which each total exactly 100100 Norwegian kroner.