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