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