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