#include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring>
#include<string>
#include <math.h>
#include<algorithm>
#include<functional>
#define int long long
#define ll long long
#define inf  1000000007
#define mod 1000000007
#define PI acos(-1)
#define pa pair<int,int>
#define pal pair<ll,ll>
#define ppa pair<int,pa>
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b))<EPS)

using namespace std;

class Point{
  public:
  double x,y;
  Point(double x=0,double y=0):x(x),y(y) {}
  Point operator + (Point p) {return Point(x+p.x,y+p.y);}
  Point operator - (Point p) {return Point(x-p.x,y-p.y);}
  Point operator * (double a) {return Point(x*a,y*a);}
  Point operator / (double a) {return Point(x/a,y/a);}
  double absv() {return sqrt(norm());}
  double norm() {return x*x+y*y;}
  bool operator < (const Point &p) const{
    return x != p.x ? x<p.x: y<p.y;
  }
  bool operator == (const Point &p) const{
    return fabs(x-p.x)<EPS && fabs(y-p.y)<EPS;
  }
};
typedef Point Vector;

struct Segment{
Point p1,p2;
};

double hen(Vector a){
if(fabs(a.x)<EPS && a.y>0) return acos(0);
else if(fabs(a.x)<EPS && a.y<0) return 3*acos(0);
else if(fabs(a.y)<EPS && a.x<0) return 2*acos(0);
else if(fabs(a.y)<EPS && a.x>0) return 0.0;
else if(a.y>0) return acos(a.x/a.absv());
else return 2*acos(0)+acos(-a.x/a.absv());

}
double cross(Vector a,Vector b){
  return a.x*b.y-a.y*b.x;
}

Point inter(Point a1, Point a2, Point b1, Point b2) {
  Point a = a2 - a1;
   Point  b = b2 - b1;
  return a1 + a * cross(b, b1-a1) / cross(b, a);
}

double dot(Vector a,Vector b){
  return a.x*b.x+a.y*b.y;
}

int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int ru[11]={1,2,4,8,16,32,64,128,256,512,1024};

ll frac[100010];
ll inv[100010];

ll saikif(ll a,int n){
  if(n==1) return a%mod;
  else if(n%2==0){
    ll q=saikif(a,n/2);
    return (q*q)%mod;
  }
  else return (a*saikif(a,n-1))%mod;
}

void gyakugen(){
  frac[0]=1;
  for(int i=1;i<=100000;i++) frac[i]=(frac[i-1]*i)%mod;
  for(int i=0;i<=100000;i++) inv[i]=saikif(frac[i],mod-2);
}

//------------kokomade--tenpure---------
vector<int> ve;
signed main(){
int n,d;
	string s;
	string t="";
	cin>>n>>s>>d;
	t=s;
	for(int i=0;i<n;i++){
		if(d==0) break;
		if(s[i]=='0'){
			t[i] ='2';
			d--;
		}
		else{
			t[i] ='1';
		}
	}
	for(int i=n-1;i>=0;i--){
		if(d==0) break;
		if(s[i]=='1'){
			t[i]='0';
			d--;
		}
	}
	//cout<<t<<endl;
	for(int i=0;i<n;i++){
		if(t[i]>'0') cout<<"1";
		else cout<<"0";
	}
	cout<<endl;
	return 0;
}
### Prompt

Construct a CPP code solution to the problem outlined:

Problem statement

There is an unsigned $ 2 $ decimal integer $ X $ with $ N $ in digits including Leading-zeros. Output the largest non-negative integer that can be expressed in $ 2 $ base in $ N $ digits where the Hamming distance from $ X $ is $ D $.

The Hamming distance between integers expressed in $ 2 $ is the number of digits with different values ​​in a number of $ 2 $. For example, the Hamming distance between $ 000 $ and $ 110 $ is $ 2 $.

Constraint

$ 1 \ leq N \ leq 1000 $
$ 0 \ leq D \ leq N $
All inputs are non-negative integers

sample

Sample input 1


Five
00001
3


Sample output 1


11101


Sample input 2


7
0110100
Four


Sample output 2


1111111


Sample input 3


18
110001001110100100
6


Sample output 3


111111111111100100


Sample input 4


3
000
0


Sample output 4


000




input

$ N $
$ X $
$ D $

output

Output the integer of the answer on the $ 1 $ line in unsigned $ 2 $ decimal notation.

Example

Input

5
00001
3


Output

11101

### Response

```cpp
#include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring>
#include<string>
#include <math.h>
#include<algorithm>
#include<functional>
#define int long long
#define ll long long
#define inf  1000000007
#define mod 1000000007
#define PI acos(-1)
#define pa pair<int,int>
#define pal pair<ll,ll>
#define ppa pair<int,pa>
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b))<EPS)

using namespace std;

class Point{
  public:
  double x,y;
  Point(double x=0,double y=0):x(x),y(y) {}
  Point operator + (Point p) {return Point(x+p.x,y+p.y);}
  Point operator - (Point p) {return Point(x-p.x,y-p.y);}
  Point operator * (double a) {return Point(x*a,y*a);}
  Point operator / (double a) {return Point(x/a,y/a);}
  double absv() {return sqrt(norm());}
  double norm() {return x*x+y*y;}
  bool operator < (const Point &p) const{
    return x != p.x ? x<p.x: y<p.y;
  }
  bool operator == (const Point &p) const{
    return fabs(x-p.x)<EPS && fabs(y-p.y)<EPS;
  }
};
typedef Point Vector;

struct Segment{
Point p1,p2;
};

double hen(Vector a){
if(fabs(a.x)<EPS && a.y>0) return acos(0);
else if(fabs(a.x)<EPS && a.y<0) return 3*acos(0);
else if(fabs(a.y)<EPS && a.x<0) return 2*acos(0);
else if(fabs(a.y)<EPS && a.x>0) return 0.0;
else if(a.y>0) return acos(a.x/a.absv());
else return 2*acos(0)+acos(-a.x/a.absv());

}
double cross(Vector a,Vector b){
  return a.x*b.y-a.y*b.x;
}

Point inter(Point a1, Point a2, Point b1, Point b2) {
  Point a = a2 - a1;
   Point  b = b2 - b1;
  return a1 + a * cross(b, b1-a1) / cross(b, a);
}

double dot(Vector a,Vector b){
  return a.x*b.x+a.y*b.y;
}

int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int ru[11]={1,2,4,8,16,32,64,128,256,512,1024};

ll frac[100010];
ll inv[100010];

ll saikif(ll a,int n){
  if(n==1) return a%mod;
  else if(n%2==0){
    ll q=saikif(a,n/2);
    return (q*q)%mod;
  }
  else return (a*saikif(a,n-1))%mod;
}

void gyakugen(){
  frac[0]=1;
  for(int i=1;i<=100000;i++) frac[i]=(frac[i-1]*i)%mod;
  for(int i=0;i<=100000;i++) inv[i]=saikif(frac[i],mod-2);
}

//------------kokomade--tenpure---------
vector<int> ve;
signed main(){
int n,d;
	string s;
	string t="";
	cin>>n>>s>>d;
	t=s;
	for(int i=0;i<n;i++){
		if(d==0) break;
		if(s[i]=='0'){
			t[i] ='2';
			d--;
		}
		else{
			t[i] ='1';
		}
	}
	for(int i=n-1;i>=0;i--){
		if(d==0) break;
		if(s[i]=='1'){
			t[i]='0';
			d--;
		}
	}
	//cout<<t<<endl;
	for(int i=0;i<n;i++){
		if(t[i]>'0') cout<<"1";
		else cout<<"0";
	}
	cout<<endl;
	return 0;
}
```