#include <bits/stdc++.h>
using namespace std;
char a[1000005];
char c[1000005];
bool H(char a[], char c[], int i, int x) {
  int d = 0;
  for (int q = 0; q < i; q += x) {
    int s = 0;
    for (int o = 0; o < x; o++) {
      if (a[o + q] > c[o])
        return 1;
      else if (a[o + q] == c[o])
        s++;
      else if (a[o + q] < c[o])
        break;
    }
    if (s == x) d++;
  }
  if (d == i / x) return 1;
  return 0;
}
int main() {
  int x, i = 0;
  cin >> x;
  while (cin >> a[i]) {
    i++;
  }
  bool K = 0;
  for (int j; j < i; j++) {
    if (a[j] != '9') {
      K = 1;
      break;
    }
  }
  if (i % x == 0 && K) {
    bool A;
    for (int j = 0; j < x; j++) {
      c[j] = a[j];
    }
    A = H(a, c, i, x);
    if (A) {
      for (int j = x - 1; j >= 0; j--) {
        if (c[j] == '9')
          c[j] = '0';
        else {
          c[j] += 1;
          break;
        }
      }
    }
    for (int j = 0; j < i / x; j++) {
      for (int v = 0; v < x; v++) cout << c[v];
    }
  } else {
    if (!K) i++;
    while (i % x != 0) {
      i++;
    }
    for (int j = 0; j < i / x; j++) {
      cout << "1";
      for (int p = 0; p < x - 1; p++) {
        cout << "0";
      }
    }
  }
  return 0;
}
