#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  int n;
  std::cin >> n;
  std::string s;
  std::cin >> s;
  std::string finalAns;
  while (1) {
    int ones = 0, zeros = 0;
    for (int i = 0; i < (int)s.length(); i++) {
      if (s[i] == '1')
        ++ones;
      else
        ++zeros;
    }
    std::string ans;
    int finalOnes = ones;
    int copy = finalOnes;
    if (ones >= 2) {
      finalOnes = ones / 2 + ones % 2;
      copy = finalOnes;
    }
    int finalLength = finalOnes + zeros;
    while (true) {
      if (ans == "" && finalOnes) {
        ans.push_back('1');
        --finalOnes;
      }
      while (zeros) {
        ans.push_back('0');
        --zeros;
      }
      while (finalOnes) {
        ans.push_back('1');
        --finalOnes;
      }
      if (!zeros and !finalOnes) break;
    }
    s = ans;
    finalAns = ans;
    if (copy <= 1) break;
  }
  std::cout << finalAns << "\n";
  return 0;
}
