Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.

Constraints

* 1 \leq N,K \leq 100
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N K


Output

Print the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.

Examples

Input

7 3


Output

1


Input

100 10


Output

0


Input

1 1


Output

0
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//数値の入力
		int N = sc.nextInt();
		int K = sc.nextInt();
		int c = 0;
		//計算
		int a = N / K;
		int b = N % K;
		
		if(b == 0){
			c = b;
		}
		else{
			c = (a + 1) - a;
		}
		//出力
		System.out.println(c);
	}
}
