#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int sum = 0;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  int count = 0;
  if (sum == 0)
    cout << "0";
  else {
    count += sum / m;
    count = abs(count);
    if (sum % m == 0)
      cout << count;
    else
      cout << count + 1;
  }
}
