Make it Equal
题号:NC244829
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

BaiQian has n numbers. She can choose any of the operating parameters . After selecting the value of k, it cannot be changed. Then BaiQian can perform an unlimited number of operations (at least once). Each operation is to select the k numbers with different positions from the n numbers and make them decrease by 1. She wants to make all the numbers equal.

How much k can BaiQian choose? If there are multiple possible k, please output the largest one.

输入描述:

The first line contains one integers n . As described in the statement . 

Then the second line contains n integers a_1,a_2,...,a_n .

输出描述:

Output an integer in a single line , indicates the answer.
示例1

输入

复制
3
5 4 4

输出

复制
2
示例2

输入

复制
4
10 10 10 1

输出

复制
3