#include <bits/stdc++.h>
using namespace std;
string addOne(string s) {
  string temp = "";
  long long carry = 1;
  for (long long i = s.size() - 1; i >= 0; i--) {
    long long dig = (s[i] - '0') + carry;
    carry = dig / 10;
    temp += ('0' + (dig % 10));
  }
  if (carry) temp += '1';
  reverse(temp.begin(), temp.end());
  return temp;
}
int32_t main() {
  long long k;
  cin >> k;
  string s;
  cin >> s;
  if (k > (long long)s.size()) {
    cout << 1;
    for (long long i = 0; i < k - 1; i++) cout << 0;
    return 0;
  }
  s = addOne(s);
  if (s.size() % k) {
    string temp = "1";
    for (long long i = 0; i < k - 1; i++) temp += '0';
    for (long long i = 0; i < (long long)((s.size()) + (k - 1)) / k; i++) {
      cout << temp;
    }
  } else {
    string w = "", res = "";
    for (long long i = 0; i < k; i++) w += s[i];
    for (long long i = 0; i < (long long)s.size() / k; i++) res += w;
    if (res >= s) {
      cout << res << endl;
    } else {
      w = "";
      res = "";
      for (long long i = 0; i < k; i++) w += s[i];
      w = addOne(w);
      for (long long i = 0; i < (long long)s.size() / k; i++) res += w;
      cout << res << endl;
    }
  }
  return 0;
}
