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