#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
void yes() {
  cout << "Yes"
       << "\n";
}
void no() {
  cout << "No"
       << "\n";
}
struct Sync_stdio {
  Sync_stdio() {
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);
  }
} _sync_stdio;
struct FAIL {
  FAIL() {
    cout << "CHANGE!!!"
         << "\n";
  }
};
int main() {
  int _;
  cin >> _;
  string s;
  cin >> s;
  if (s == "0") {
    cout << 0;
    return 0;
  }
  sort(s.begin(), s.end());
  while (s.size() && s.back() == '1') {
    s.pop_back();
  }
  s.push_back('1');
  reverse(s.begin(), s.end());
  cout << s;
}
