#include <bits/stdc++.h>
using namespace std;
int main() {
  int l;
  cin >> l;
  string s;
  cin >> s;
  int n = s.size();
  if (n % l) {
    int x = n / l + 1;
    while (x--) {
      cout << "1";
      for (int i = 0; i < l - 1; i++) cout << "0";
    }
    exit(0);
  }
  string b = s.substr(0, l);
  bool change = 1, t = 1;
  bool all9 = 1;
  for (int i = 0; i < n; i++)
    if (s[i] != '9') all9 = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] > b[i % l]) break;
    if (s[i] < b[i % l]) {
      change = 0;
      break;
    }
  }
  int x = n / l;
  if (all9) {
    x++;
    while (x--) {
      cout << "1";
      for (int i = 0; i < l - 1; i++) cout << "0";
    }
    exit(0);
  }
  if (change) {
    int i = l - 1;
    while (b[i] == '9') b[i--] = '0';
    b[i] += 1;
  }
  for (int i = 0; i < x; i++) cout << b;
}
