#include <bits/stdc++.h>
int a[1000000];
int cmp(const void *a, const void *b) { return (*(int *)a - *(int *)b); }
int main() {
  int i, j, n, m, sum, count;
  while (scanf("%d%d", &n, &m) != EOF) {
    sum = 0;
    count = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      sum += a[i];
    }
    if (sum == 0) {
      printf("0\n");
      continue;
    } else if (sum < 0) {
      while (1) {
        sum += m;
        count++;
        if (sum >= 0) break;
      }
    } else if (sum > 0) {
      while (1) {
        sum -= m;
        count++;
        if (sum <= 0) break;
      }
    }
    printf("%d\n", count);
  }
  return 0;
}
