#include <bits/stdc++.h>
using namespace std;
bool check(string a, int l) {
  for (int i = 0; i < l; i++) {
    if (a[i] != '9') return false;
  }
  return true;
}
string f(string s, int l) {
  int c = 1;
  for (int i = l - 1; i >= 0; i--) {
    int k = s[i] - '0' + c;
    c = k / 10;
    k = k % 10;
    s[i] = k + '0';
    if (c == 0) break;
  }
  return s;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int l, i, k;
  cin >> l;
  string a, b, s;
  cin >> a;
  b = a;
  int n = a.length();
  if (n % l != 0) {
    k = n / l;
    k = (k + 1) * l;
    for (i = 0; i < k; i++) {
      if (i % l == 0)
        s.push_back('1');
      else
        s.push_back('0');
    }
    cout << s << endl;
    goto end;
  }
  for (i = l; i < n; i++) b[i] = b[i - l];
  if (b > a)
    s = b;
  else if (!check(a, l)) {
    s = a.substr(0, l);
    s = f(s, l);
    for (i = l; i < n; i++) s.push_back(s[i - l]);
  } else if (!check(a, n)) {
    for (i = 0; i < n; i++) s.push_back('9');
  } else {
    k = n / l;
    k = (k + 1) * l;
    for (i = 0; i < k; i++) {
      if (i % l == 0)
        s.push_back('1');
      else
        s.push_back('0');
    }
  }
  cout << s << endl;
end:;
}
