660_C. Hard Process_9705
You are given an array a with n elements. Each element of a is either 0 or 1.

Let's denote the length of the longest subsegment of consecutive elements in a, consisting of only numbers one, as f(a). You can change no more than k zeroes to ones to maximize f(a).

Input

The first line contains two integers n and k (1 ≤ n ≤ 3·105, 0 ≤ k ≤ n) — the number of elements in a and the parameter k.

The second line contains n integers ai (0 ≤ ai ≤ 1) — the elements of a.

Output

On the first line print a non-negative integer z — the maximal value of f(a) after no more than k changes of zeroes to ones.

On the second line print n integers aj — the elements of the array a after the changes.

If there are multiple answers, you can print any one of them.

Examples

Input

7 1
1 0 0 1 1 0 1


Output

4
1 0 0 1 1 1 1


Input

10 2
1 0 0 1 0 1 0 1 0 1


Output

5
1 0 0 1 1 1 1 1 0 1
import java.io.*;
import java.util.*;

public class hard_process 
{
	

	public int advanceL(int []a, int l)
	{
		for (int i = l; i< a.length; i++)
		{
			if (a[i]==0)
				return(i+1);
		}
		return(0);
	}
	
	public void printSequence(int[] a, int l_max, int r_max, int k)
	{
		int n = a.length;
		StringBuilder ans = new StringBuilder();
		//System.out.println(l_max +" --> "+r_max);
		for (int k1 = 0; k1< n;k1++)
		{
			if ((k1>= l_max)&&(k1<=r_max)&&(k>0))
				a[k1] = 1;
			ans.append(a[k1]).append(" ");
			
		}
		System.out.println(ans.toString().trim());
	}
	
	public static void main(String args[])throws IOException
	{
		Scanner sc = new Scanner(System.in);
		hard_process hp = new hard_process();
		
		
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		
		
		int [] a = new int [n];
		for (int i = 0; i< n; i++)
			a[i] = sc.nextInt();
		
		int [] sum = new int [n];
		int cum = 0;
		
		for (int i = 0; i< n; i++)
		{
			cum +=a[i];
			sum[i] = cum;
		}
		
		int l = 0; 
		int r = 0;
		int c = 0;
		int i = 0;
		for (i = 0; i< n; i++)
		{
			if (a[i]==0)
				c++;
			if (c==k+1)
				break;
		}
		r = i-1;
		int max_seq = r-l+1;
		int r_max = r;
		int l_max = l;
		//for (int k1 = 0; k1< n;k1++)
			//System.out.print(sum[k1]+" ");
		//System.out.println(max_seq);
		//hp.printSequence(a, l, r, k);
		//System.out.println();
		
		r = r+1;
		while ((l < n) && (r < n))
		{
			
			
			if (a[r] == 0)
			{
				l = hp.advanceL(a, l);
				//System.out.println(l+" here ");
				if (r-l+1>max_seq)
				{
					max_seq = r-l+1;
					r_max = r;
					l_max = l;
				}
				//System.out.println(l+" here " +r);
			}
			else
			{
				if (r-l+1>max_seq)
				{
					max_seq = r-l+1;
					r_max = r;
					l_max = l;
				}
				
			}
			
			r = r+1;
		}
		System.out.println(max_seq);
		hp.printSequence(a, l_max, r_max, k);
		
	}

}

7 1
1 0 0 1 1 0 1
 10 2
1 0 0 1 0 1 0 1 0 1
 7 3
1 0 0 0 0 1 0
 1 0
0
 3 0
1 1 1
 3 1
0 0 0
 1 0
1
 3 0
0 0 0
 1 1
0
 3 1
0 0 1
 2 0
0 0
 7 3
1 1 1 1 1 1 1
 7 0
0 1 0 0 0 1 0
 7 7
1 0 1 0 0 0 0
 1 1
1
 2 1
0 0
 2 2
1 0
 7 2
1 0 1 1 0 0 0
 2 0
0 1
 10 3
0 0 1 0 0 1 0 0 1 1
 7 3
1 0 0 1 0 1 0
 3 2
0 0 0
 3 0
1 0 0
 3 2
0 0 1
 7 1
0 1 0 0 0 1 0
 7 2
1 0 1 0 0 0 0
 2 2
0 0
 10 3
0 0 0 0 0 1 0 0 1 1
 7 1
0 1 1 0 0 1 0
 7 1
0 1 1 0 0 0 0
 7 3
0 0 0 0 0 1 0
 7 6
1 1 1 1 1 1 1
 10 5
0 0 1 0 0 1 0 0 1 1
 7 0
1 0 0 1 1 0 1
 7 1
0 1 0 0 1 1 0
 7 1
0 1 1 0 0 1 1
 7 0
0 1 1 0 0 0 0
 7 3
0 0 1 0 0 1 0
 7 1
1 0 0 0 0 0 0
 10 5
0 0 1 0 0 0 0 0 1 1
 7 0
1 0 1 1 1 0 1
 7 0
0 1 1 0 1 1 0
 7 0
0 1 0 1 0 1 0
 2 0
1 0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