#include <bits/stdc++.h>
using namespace std;
bool AllNines(string A) {
  for (int i = 0; i < A.size(); i++) {
    if (A[i] != '9') {
      return false;
    }
  }
  return true;
}
string Increase(string x) {
  int p = x.size() - 1;
  while (x[p] == '9') {
    x[p] = '0';
    p--;
  }
  x[p]++;
  return x;
}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if ((s.size() % n != 0) || AllNines(s)) {
    for (int i = 1; i <= (s.size() / n) + 1; i++) {
      cout << 1;
      for (int i = 1; i < n; i++) {
        cout << 0;
      }
    }
  } else {
    string P = "";
    for (int i = 0; i < n; i++) {
      P += s[i];
    }
    string PP = "";
    while (PP.length() != s.length()) {
      PP += P;
    }
    if (PP > s) {
      cout << PP << endl;
      return 0;
    }
    string Q = Increase(P);
    string QQ = "";
    while (QQ.length() != s.length()) {
      QQ += Q;
    }
    cout << QQ << endl;
  }
}
