#include <bits/stdc++.h>
using namespace std;
int i, i0, n, m, ans;
int main() {
  scanf("%d", &n);
  string s, t;
  cin >> s;
  if (s.length() % n == 0) {
    string tmp = s.substr(0, n);
    int d = s.length() / n;
    while (d--) t += tmp;
    if (t <= s) {
      t.clear();
      bool f = 1;
      for (int i = tmp.length() - 1; i >= 0; i--)
        if (tmp[i] != '9') f = 0;
      if (f) {
        tmp = "1";
        for (int i = 1; i < n; i++) tmp += '0';
        d = s.length() / n + 1;
        while (d--) t += tmp;
      } else {
        for (int i = tmp.length() - 1; i >= 0; i--) {
          if (tmp[i] == '9') {
            tmp[i] = '0';
          } else {
            tmp[i]++;
            break;
          }
        }
        d = s.length() / n;
        while (d--) t += tmp;
      }
    }
  } else {
    string tmp = "1";
    for (int i = 1; i < n; i++) tmp += '0';
    int d = s.length() / n + 1;
    while (d--) t += tmp;
  }
  cout << t << endl;
  return 0;
}
