CF538C Tourist's Notes

Description

A tourist hiked along the mountain range. The hike lasted for $ n $ days, during each day the tourist noted height above the sea level. On the $ i $ -th day height was equal to some integer $ h_{i} $ . The tourist pick smooth enough route for his hike, meaning that the between any two consecutive days height changes by at most 1, i.e. for all $ i $ 's from 1 to $ n-1 $ the inequality $ |h_{i}-h_{i+1}|

Input Format

The first line contains two space-separated numbers, $ n $ and $ m $ ( $ 1

Output Format

If the notes aren't contradictory, print a single integer — the maximum possible height value throughout the whole route. If the notes do not correspond to any set of heights, print a single word 'IMPOSSIBLE' (without the quotes).

Explanation/Hint

For the first sample, an example of a correct height sequence with a maximum of 2: $ (0,0,1,2,1,1,0,1) $ . In the second sample the inequality between $ h_{7} $ and $ h_{8} $ does not hold, thus the information is inconsistent.