You are a leading programmer at CompanyTM, and have been given the following task. Given a list of N integers x_1,…,x_N, is their product x_1⋅x_2⋅⋯⋅x_N even? You plug away at the problem using every trick in the book, and come up with a very elegant solution. Lo and behold, your supervisor then informs you that the task has changed! It turns out the higher ups want you to find out if the product x_1⋅x_2⋅⋯⋅x_N is divisible by 2K for some integer K≥0.
You just can’t catch a break!
The input consists of two integers N,K (1≤N≤100000 and 0≤K≤1000). These are followed by N lines, each with a single value x_1,…,x_N respectively (1≤x_i≤109 for each 1≤i≤N) which form the product.
Display 1 if 2K divides x_1⋅x_2⋅⋯⋅x_N, otherwise display 0.