#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string x;
  cin >> x;
  int l = x.length();
  if (l % n == 0) {
    string res = "";
    for (int i = 0; i < n; i++) res.append(x, i, 1);
  well:
    string temp = res;
    for (int i = 0; i < l / n - 1; i++) res += temp;
    if (res <= x && res.length() <= x.length()) {
      res = res.substr(0, n);
      int t = n;
    ho:
      res[t - 1]++;
      if (res[t - 1] > '9') {
        res[(t--) - 1] = '0';
        if (t == 0) {
          res[0] = '1';
          l += n;
          goto well;
        }
        goto ho;
      }
      goto well;
    }
    cout << res;
    return 0;
  }
  int times = l / n + 1;
  string res = "1";
  for (int i = 0; i < n - 1; i++) res += "0";
  for (int i = 0; i < times; i++) cout << res;
  return 0;
}
