#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s = 0, t;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> t;
    s += t % n;
    s %= n;
  }
  if (s == 0)
    cout << n;
  else
    cout << n - 1;
  return 0;
}
