#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b % 2 != 0) {
      ans = (ans * a) % 1000000007;
    }
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    int l;
    string s;
    cin >> l >> s;
    int o = 0;
    if (s.size() < l) {
      s = '1';
      while (s.size() != l) s += '0';
      o = 1;
    }
    if (o == 0) {
      int i = s.size() - 1;
      while (i >= 0 && s[i] == '9') {
        s[i] = '0';
        i--;
      }
      if (i < 0) {
        s = '1' + s;
      } else {
        s[i]++;
      }
      int len = s.size();
      if (s.size() % l != 0) s = '1';
      while (s.size() < len || s.size() % l != 0) {
        s += '0';
      }
    }
    char a[l];
    for (int i = 0; i < l; i++) {
      a[i] = s[i];
    }
    vector<char> v[l];
    for (int i = 0; i < s.size(); i++) {
      v[i % l].push_back(s[i]);
    }
    o = 1;
    for (int j = 0; j < v[0].size(); j++) {
      for (int i = 0; i < l; i++) {
        if (v[i][j] == a[i]) {
          continue;
        } else {
          if (v[i][j] < a[i])
            o = 0;
          else
            o = -1;
          break;
        }
      }
      if (o != 1) break;
    }
    if (o == -1) {
      int i = l - 1;
      while (i >= 0 && a[i] == '9') {
        a[i] = '0';
        i--;
      }
      a[i]++;
    }
    int i = 0;
    while (i != s.size()) {
      cout << a[i % l];
      i++;
    }
  }
  return 0;
}
