CF1020A New Building for SIS

Description

You are looking at the floor plan of the Summer Informatics School's new building. You were tasked with SIS logistics, so you really care about travel time between different locations: it is important to know how long it would take to get from the lecture room to the canteen, or from the gym to the server room. The building consists of $ n $ towers, $ h $ floors each, where the towers are labeled from $ 1 $ to $ n $ , the floors are labeled from $ 1 $ to $ h $ . There is a passage between any two adjacent towers (two towers $ i $ and $ i+1 $ for all $ i $ : $ 1

Input Format

The first line of the input contains following integers: - $ n $ : the number of towers in the building ( $ 1

Output Format

For each query print a single integer: the minimum walking time between the locations in minutes.