Pyth's Magical Ladder

0

0 votes
Very-Easy
Problem

Pyth has acquired a 5-foot magical ladder from a land far far away which can be used in any land structure of any given height and base imaginable. There’s just one problem. It does not work and extend unless the exact length of the ladder is whispered or the height of the structure is less than or equal twice its length.

enter image description here

As his best buddy, you are tasked to help Pyth in this task.

INPUT

There are several lines of input. Each line contains the height of the structure and the width of the base.

OUTPUT

For each line of input, display the height of the ladder. Otherwise, display the original length of the ladder.

CONSTRAINT

height, base > 0

The ladder cannot accept a fractional length as input.

SAMPLE INPUT

100 20

SAMPLE OUTPUT

101
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?