#Lutece2337. %%BlackRed·Z
%%BlackRed·Z
Migrated from Lutece 2337 %%BlackRed·Z
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
众所周知,ICPCer 的一项传统艺能就是 (mó)。当我们面对大佬的时候,经常会膜一下表示我们的敬意。而当我们面对大数的时候,也经常会模一下表示我们对 OJ 的敬意。
模运算定义: 表示 除以 余数为 。现在我们有 个正整数,第 个数为 。对于一个非负整数 ,。爱思考的 OrangeRain 想找到一个 ,使得 最大,请你告诉他 最大是多少。
Input
第一行包含正整数 ()。
第二行包含 个正整数,第 个数为 ()。
Output
输出最大的 。
Samples
5
7 46 11 20 11
90
Resources
电子科技大学第十一届 ACM 趣味程序设计竞赛