Codeforces Round 235 (Div. 2)
A
Vanya and Cards
Codeforces
800
原题
←B →
翻译中…

Vanya loves playing. He even has a special set of cards to play with. Each card has a single integer. The number on the card can be positive, negative and can even be equal to zero. The only limit is, the number on each card doesn't exceed $*x*$ in the absolute value.

翻译中…

Natasha doesn't like when Vanya spends a long time playing, so she hid all of his cards. Vanya became sad and started looking for the cards but he only found $*n*$ of them. Vanya loves the balance, so he wants the sum of all numbers on found cards equal to zero. On the other hand, he got very tired of looking for cards. Help the boy and say what is the minimum number of cards does he need to find to make the sum equal to zero?

翻译中…

You can assume that initially Vanya had infinitely many cards with each integer number from $- *x*$ to $*x*$.

翻译中…

Input

翻译中…

The first line contains two integers: $*n*$ $(1 ≤ *n* ≤ 1000)$ — the number of found cards and $*x*$ $(1 ≤ *x* ≤ 1000)$ — the maximum absolute value of the number on a card. The second line contains $*n*$ space-separated integers — the numbers on found cards. It is guaranteed that the numbers do not exceed $*x*$ in their absolute value.

翻译中…

Output

翻译中…

Print a single number — the answer to the problem.

翻译中…

Note

翻译中…

In the first sample, Vanya needs to find a single card with number -2.

翻译中…

In the second sample, Vanya needs to find two cards with number 2. He can't find a single card with the required number as the numbers on the lost cards do not exceed 3 in their absolute value.

翻译中…

样例

Input #1
3 2
-1 1 2
Output #1
1
InputCopy OutputCopy
Input #2
2 3
-2 -2
Output #2
2
InputCopy OutputCopy
题目信息
题号
401A
时间限制
1 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。