#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long int mod = 1e9 + 7;
const long long int pinf = ((long long int)2e18);
const long long int ninf = ((long long int)-2e18);
const long long int N = (long long int)3e5 + 5;
const long long int MOD = 998244353;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  {
    long long int l, n, x, q, sum = 0, y, i, j, p;
    cin >> l;
    string a;
    cin >> a;
    n = a.size();
    string ans;
    long long int nine = 0;
    for (long long int i = 0; i < n; i++) {
      nine += (a[i] == '9');
    }
    if (l > n) {
      ans.push_back('1');
      for (long long int i = 1; i < l; i++) {
        ans.push_back('0');
      }
    } else if (n % l != 0) {
      long long int temp = n / l;
      ans.push_back('1');
      for (long long int i = 1; i < l; i++) {
        ans.push_back('0');
      }
      string t = ans;
      for (long long int i = 0; i < temp; i++) {
        ans += t;
      }
    } else {
      string pref = a.substr(0, l);
      if (nine == n) {
        long long int temp = n / l;
        ans.push_back('1');
        for (long long int i = 1; i < l; i++) {
          ans.push_back('0');
        }
        string t = ans;
        for (long long int i = 0; i < temp; i++) {
          ans += t;
        }
      } else {
        long long int flag = 1;
        for (long long int i = l; i < n; i++) {
          if (a[i % l] < a[i]) {
            break;
          } else if (a[i % l] > a[i]) {
            flag = 0;
            break;
          }
        }
        if (flag == 0) {
          long long int temp = n / l;
          string t = pref;
          for (long long int i = 0; i < temp; i++) {
            ans += t;
          }
        } else {
          i = l - 1;
          while (i >= 0 && pref[i] == '9') {
            pref[i] = '0';
            i--;
          }
          if (i >= 0) {
            pref[i]++;
          }
          long long int temp = n / l;
          string t = pref;
          for (long long int i = 0; i < temp; i++) {
            ans += t;
          }
        }
      }
    }
    cout << ans;
  }
  return 0;
}
