#include <bits/stdc++.h>
using namespace std;
const long long INF = LONG_LONG_MAX;
const long long NINF = LONG_LONG_MIN;
const long long mmod = 1000000007;
const long long N = 5e6;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long l;
  cin >> l;
  string s;
  cin >> s;
  if (l <= (long long)s.size() && (long long)s.size() % l == 0) {
    string t = s.substr(0, l);
    bool ok = false;
    bool same = true;
    for (long long i = l; i < (long long)s.size(); i++) {
      if (s[i] > t[i % l]) {
        ok = true;
      }
      same &= (s[i] == t[i % l]);
      if (!same) break;
    }
    long long r = 0;
    if (ok || same) {
      r = 1;
      for (long long i = (long long)t.size() - 1; i >= 0; --i) {
        long long d = t[i] - '0';
        d += r;
        r = d / 10;
        d %= 10;
        t[i] = d + '0';
      }
    }
    if (r > 0) {
      string tt(l, '0');
      tt[0] = '1';
      long long n = (long long)s.size();
      s = "";
      for (long long i = 0; i < ((n + l - 1) / l) + 1; i++) s += tt;
    } else {
      for (long long i = 0; i < (long long)s.size(); i++) {
        s[i] = t[i % l];
      }
    }
  } else {
    string t(l, '0');
    t[0] = '1';
    long long n = (long long)s.size();
    s = "";
    for (long long i = 0; i < ((n + l - 1) / l); i++) s += t;
  }
  cout << s << endl;
}
