#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n >> x;
  int sum = 0;
  int *arr = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  int cnt = 0;
  if (sum == 0) {
    cnt = 0;
  } else {
    if (sum < 0) {
      while (abs(sum) >= x) {
        cnt++;
        sum += x;
      }
      if (sum != 0) cnt++;
    } else if (sum > 0) {
      while (sum >= x) {
        cnt++;
        sum -= x;
      }
      if (sum != 0) cnt++;
    }
  }
  cout << cnt << endl;
}
