#include <bits/stdc++.h>
using namespace std;
int main() {
  int l;
  cin >> l;
  string s;
  cin >> s;
  int n = s.length();
  string t = "";
  string q = s.substr(0, min(n, l));
  int cnt9 = 0;
  for (int i = 0; i < min(n, l); i++)
    if (q[i] == '9') cnt9++;
  string f = "";
  while (f.length() < s.length()) {
    f += q;
  }
  if (n % l == 0 && f.compare(s) > 0) {
    t = q;
  } else if (n % l == 0 && cnt9 != l) {
    string temp = "";
    int carry = 1;
    int pos = l - 1;
    while (carry != 0) {
      int curr = q[pos] - '0';
      curr = (curr + 1);
      carry = curr / 10;
      curr = (curr % 10);
      q[pos] = (curr + '0');
      pos--;
    }
    t = q;
  } else {
    t += "1";
    for (int i = 0; i < l - 1; i++) t += "0";
  }
  string ans = "";
  if ((n % l == 0 && cnt9 != l) || (n % l == 1) ||
      (n % l == 0 && f.compare(s) > 0)) {
    while (ans.length() < n) {
      ans += t;
    }
  } else {
    while (ans.length() <= n) {
      ans += t;
    }
  }
  cout << ans;
  return 0;
}
