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