#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, total = 0, a;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a);
    total += a;
  }
  if (total % n)
    cout << n - 1 << endl;
  else
    cout << n << endl;
  return 0;
}
