CF500E New Year Domino

Description

Celebrating the new year, many people post videos of falling dominoes; Here's a list of them: https://www.youtube.com/results?search\_query=New+Years+Dominos User ainta, who lives in a 2D world, is going to post a video as well. There are $ n $ dominoes on a 2D Cartesian plane. $ i $ -th domino ( $ 1

Input Format

N/A

Output Format

N/A

Explanation/Hint

Consider the example. The dominoes are set like the picture below. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF500E/69189c949bbf1e3980e2fd50301d969359a4096f.png)Let's take a look at the 4th plan. To make the 6th domino fall by pushing the 2nd domino, the length of the 3rd domino (whose x-coordinate is 4) should be increased by 1, and the 5th domino (whose x-coordinate is 9) should be increased by 1 (other option is to increase 4th domino instead of 5th also by 1). Then, the dominoes will fall like in the picture below. Each cross denotes a touch between two dominoes. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF500E/6a17a43a3d05b4fceb521113b22deae344f88b4a.png) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF500E/a58f494f30ab4662cf64a0b15656a9dc77793371.png) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF500E/b71e767b3c7cf778590e571800dc614fef82da50.png) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF500E/c0207539620df6be43ff32b6c6c47fe615cfd5fd.png) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF500E/8f6e8505e7e0c11feeece111e6108210f04cb5d4.png)