#include <bits/stdc++.h>
int n, x, s;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &x), s += x;
  if (s % n == 0)
    printf("%d\n", n);
  else
    printf("%d\n", n - 1);
  return 0;
}
