#include <bits/stdc++.h>
using namespace std;
int n, dem;
string s;
void setup() {}
void solve() {
  cin >> n;
  cin >> s;
  if (n == 1)
    cout << s;
  else {
    for (int i = 0; i <= n - 1; ++i) dem += s[i] == '0';
    cout << 1;
    for (int i = 1; i <= dem; ++i) cout << 0;
  }
}
int main() {
  setup();
  solve();
  return 0;
}
