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