#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
template <typename t>
using vc = vector<t>;
template <typename t>
using minpq = priority_queue<t, vc<t>, greater<t>>;
template <typename t>
using maxpq = priority_queue<t>;
void solve() {
  long long l;
  cin >> l;
  string s;
  cin >> s;
  long long n = s.length();
  if (n % l) {
    string t = "1";
    for (long long i = 1; i < l; i++) t += '0';
    long long len = (n + l - 1) / l;
    for (long long i = 0; i < len; i++) cout << t;
  } else {
    bool flag = 0;
    for (long long i = 0; i < n; i++) flag |= (s[i] != '9');
    if (!flag) {
      string t = "1";
      n++;
      for (long long i = 1; i < l; i++) t += '0';
      long long len = (n + l - 1) / l;
      for (long long i = 0; i < len; i++) cout << t;
    } else {
      long long dif(-1);
      for (long long i = l; i < n; i++) {
        if (s[i] < s[i % l]) {
          dif = 1;
          break;
        } else if (s[i] > s[i % l])
          break;
      }
      if (dif == -1) {
        for (long long i = l - 1; i >= 0; i--) {
          if (s[i] < '9') {
            s[i]++;
            break;
          }
          s[i] = '0';
        }
      }
      for (long long i = l; i < n; i++) s[i] = s[i % l];
      cout << s;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t(1);
  for (long long i = 1; i <= t; solve(), i++)
    ;
  return 0;
}
