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