#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int n;
string s, ans;
int main() {
cin >> n >> s;
int cnt1 = 0;
int cnt2 = 0;
for (int i = 0;i < n;++i) {
if (s[i] == '0') {
cnt1++;
}
}
if (n == 1 && s[0] == '0') {
cout << s << endl;
}
else {
ans += "1";
for (int i = 1;i <= cnt1;++i) {
ans += "0";
}
}
cout << ans << endl;
//system("pause");
return 0;
}