#include <bits/stdc++.h>
using namespace std;
int main() {
  int L;
  string A;
  cin >> L >> A;
  int n = A.length();
  char a[n + 1], b[n + 1];
  for (int i = 1; i <= n; i++) a[i] = A[i - 1];
  if (n % L) {
    int m = ((n + L - 1) / L) * L;
    for (int i = 1; i <= m; i++) {
      if (i % L == 1)
        cout << 1;
      else
        cout << 0;
    }
  } else {
    for (int i = 1; i <= L; i++)
      for (int j = i; j <= n; j += L) b[j] = a[i];
    int i = L, f = 0;
    for (int i = 1; i <= n; i++) {
      if (b[i] != a[i]) {
        if (b[i] > a[i]) f++;
        break;
      }
    }
    if (f) {
      for (int i = 1; i <= n; i++) cout << b[i];
      return 0;
    }
    while ((i >= 1) && (a[i] == '9')) {
      a[i] = '0';
      i--;
    }
    if (i == 0) {
      a[i] = '1';
      for (int j = 0; j < n + L; j++) {
        if (j % L == 0)
          cout << 1;
        else
          cout << 0;
      }
    } else {
      a[i]++;
      for (int i = 1; i <= L; i++) {
        for (int j = i + L; j <= n; j += L) a[j] = a[i];
      }
      for (int i = 1; i <= n; i++) cout << a[i];
    }
  }
  return 0;
}
