import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main
{
{
String[] params1
= bufferedReader.
readLine().
split(" "); int quantity, force, count = 0, max = 0;
quantity
= Integer.
parseInt(params1
[0]);
String[] params2
= bufferedReader.
readLine().
split(" "); for(int i = 0; i < quantity; ++i)
{
force
= Integer.
parseInt(params2
[i
]); if (force > max)
{
max = force;
count = 1;
}
else if (force == max) count++;
}
}
}
aW1wb3J0IGphdmEuaW8uQnVmZmVyZWRSZWFkZXI7CmltcG9ydCBqYXZhLmlvLklucHV0U3RyZWFtUmVhZGVyOwogCmNsYXNzIE1haW4KewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJQnVmZmVyZWRSZWFkZXIgYnVmZmVyZWRSZWFkZXIgPSBuZXcgQnVmZmVyZWRSZWFkZXIobmV3IElucHV0U3RyZWFtUmVhZGVyKFN5c3RlbS5pbikpOwogICAgICAgIFN0cmluZ1tdIHBhcmFtczEgPSBidWZmZXJlZFJlYWRlci5yZWFkTGluZSgpLnNwbGl0KCIgIik7CiAgICAgICAgaW50IHF1YW50aXR5LCBmb3JjZSwgY291bnQgPSAwLCBtYXggPSAwOwogICAgICAgIHF1YW50aXR5ID0gSW50ZWdlci5wYXJzZUludChwYXJhbXMxWzBdKTsKICAgICAKICAgICAgICBTdHJpbmdbXSBwYXJhbXMyID0gYnVmZmVyZWRSZWFkZXIucmVhZExpbmUoKS5zcGxpdCgiICIpOwogICAgICAgIGZvcihpbnQgaSA9IDA7IGkgPCBxdWFudGl0eTsgKytpKQogICAgICAgIHsKICAgICAgICAgICAgZm9yY2UgPSBJbnRlZ2VyLnBhcnNlSW50KHBhcmFtczJbaV0pOwogICAgICAgICAgICBpZiAoZm9yY2UgPiBtYXgpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIG1heCA9IGZvcmNlOwogICAgICAgICAgICAgICAgY291bnQgPSAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGZvcmNlID09IG1heCkgY291bnQrKzsKICAgICAgICB9CiAgICAgICAgU3lzdGVtLm91dC5wcmludChjb3VudCk7Cgl9Cn0=