#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int ans[N], b[N];
char a[N];
int l;
int check(int len) {
  for (int i = 1; i <= len; i++) {
    int t = i % l;
    if (t == 0) t = l;
    if (b[i] < ans[t])
      return 0;
    else if (b[i] > ans[t])
      return 1;
  }
  return 1;
}
int main() {
  scanf("%d", &l);
  scanf("%s", a + 1);
  int len = strlen(a + 1);
  for (int i = 1; i <= len; i++) b[i] = a[i] - '0';
  int mul = len / l;
  if (len % l == 0) {
    for (int i = 1; i <= l; i++) ans[i] = b[i];
    int flag = 1;
    int sum = 0;
    while (check(len)) {
      for (int i = l; i >= 1; i--) {
        if (i == 1 && ans[i] == 9 && sum == l - 1) {
          flag = 0;
          break;
        }
        if (ans[i] == 9) {
          ans[i] = 0;
          sum++;
          continue;
        } else {
          ans[i] += 1;
          break;
        }
      }
      if (flag == 0) break;
    }
    if (flag == 0) {
      mul++;
      ans[1] = 1;
      for (int i = 2; i <= l; i++) ans[i] = 0;
    }
    while (mul--) {
      cout << ans[1];
      for (int i = 2; i <= l; i++) cout << ans[i];
    }
  } else {
    mul++;
    while (mul--) {
      cout << 1;
      for (int i = 1; i < l; i++) cout << 0;
    }
  }
  return 0;
}
