{"raw_statement":[{"iden":"background","content":"藤原氏，权倾一时的重臣。凭借着炙手可热的权势，杀害了政敌长屋王而触碰到了最高的权力。\n\n是天谴吗？即使修缮寺庙积德行善，藤原四兄弟最终覆灭在了天花之下。"},{"iden":"statement","content":"环环相扣的因果报应可看成平面上的 $n$ 个小正方形，它们的边长分别为 $1,2,3,\\cdots,n$。初始时，编号较小的正方形被编号较大的正方形完全包含：\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/w5f6nucw.png)\n\n为了方便记录正方形的位置，我们取正方形左上角的坐标 $(x_i,y_i)$ 为正方形的坐标。此时可以唯一确定该正方形。\n\n现在需要将最小的正方形的位置移动到 $(x_{\\rm end},y_{\\rm end})$，移动过程满足：\n\n- 每次**最多移动一个**正方形，可以往上下左右四个方向之一移动一个单位长度。\n- 在移动过程中，需要保证**较小正方形会被较大的正方形包含**。\n\n请求出最少次数。"},{"iden":"input","content":"第一行有三个整数 $n, x_{\\mathrm{end}},y_{\\mathrm{end}}$，含义如题面所示。\n\n接下来 $n$ 行，每行有两个整数 $x_i,y_i$，描述第 $i$ 小的正方形左上角的坐标。"},{"iden":"output","content":"输出共一行一个整数，表示最小的操作步数。"},{"iden":"note","content":"### 样例 1 解释\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/dcghf89y.png)\n\n### 数据范围及约定\n\n对于全部数据，$1\\le n\\le 10^5$，$0\\le x_i,y_i,x_{\\mathrm{end}},y_{\\mathrm{end}}\\le 10^9$。"}],"translated_statement":null,"sample_group":[["3 2 1\n1 0\n1 0\n0 1\n","3\n\n"],["15 8 4\n9 0\n9 1\n9 1\n8 1\n8 2\n8 3\n7 3\n6 3\n5 3\n4 3\n3 3\n2 4\n2 5\n1 6\n0 7\n","24\n"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}