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