660_C. Hard Process_9703
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
#include <bits/stdc++.h>
using namespace std;
const int tam = 100010;
const int MOD = 1000000007;
const int MOD1 = 998244353;
const double DINF = 1e100;
const double EPS = 1e-9;
const double PI = acos(-1);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> ar(n);
  for (int i = 0; i < n; i++) cin >> ar[i];
  if (k == 0) {
    int ra = 0;
    int fru = -1;
    for (int i = 0; i < n; i++) {
      if (ar[i] == 1) {
        if (fru == -1) fru = i;
        ra = max(ra, i - fru + 1);
      } else
        fru = -1;
    }
    cout << ra << '\n';
    for (int i = 0; i < n; i++) cout << ar[i] << ' ';
    return 0;
  }
  int fro = 0, to = -1;
  for (int i = 0; i < k; i++) {
    while (to < n - 1 && ar[to + 1] == 1) to++;
    if (to < n - 1) to++;
    while (to < n - 1 && ar[to + 1] == 1) to++;
  }
  pair<int, pair<int, int>> res(to - fro + 1, {fro, to});
  while (to < n - 1) {
    to++;
    while (to < n - 1 && ar[to + 1] == 1) to++;
    while (fro < to && ar[fro] == 1) fro++;
    if (fro < to) fro++;
    res = max(res, make_pair(to - fro + 1, make_pair(fro, to)));
  }
  for (int i = res.second.first; i < res.second.second + 1; i++) ar[i] = 1;
  cout << res.first << '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