You are given an integer sequence of length and an integer .
You can perform the following operation as many times as you want. (Possibly, zero)
- Choose an integer satisfying , and change to . Note that if , this operation is equivalent to subtracting from .
Your goal is to make the sequence satisfy the following condition.
Find the minimum number of operations required.
Input
The input is given in the following format.
Output
Print the minimum number of operations required to satisfy the given condition.
Constraints
- .
- .
- ().
Subtasks
Samples
예제 1
입력
3 2
4 1 3
출력
4
예제 2
입력
3 -2
4 1 3
출력
2