#include <bits/stdc++.h>
using namespace std;
int l;
string a;
void setup() {
  cin >> l;
  cin >> a;
}
int toInt(char s) { return (int)(s - '0'); }
string addi(string s) {
  int remainder = 1;
  string result;
  for (int i = s.size() - 1; i >= 0; i--) {
    int q = toInt(s[i]) + remainder;
    remainder = 0;
    if (q >= 10) {
      q -= 10;
      remainder += 1;
    }
    result += (char)(q + '0');
  }
  if (remainder > 0) result += '1';
  string _result;
  int t = result.size();
  for (int i = 0; i < result.size(); ++i) {
    _result += result[t - 1 - i];
  }
  return _result;
}
string tackle() {
  string result;
  string unit;
  string limiter;
  for (int i = 0; i < l; i++) limiter += '9';
  int minlength = a.size();
  int totalLength = 0;
  totalLength = (minlength / l) * l;
  if (totalLength < minlength) totalLength += l;
  if (totalLength > minlength) {
    for (int i = 0; i < totalLength; ++i) {
      if (i % l == 0)
        result += '1';
      else
        result += '0';
    }
    return result;
  }
  bool normalSituation = true;
  int x = totalLength / l;
  string minString = a.substr(0, l);
  int c = -1;
  int z = -1;
  for (int i = 1; i <= x - 1; ++i) {
    string currentString = a.substr(i * l, l);
    if (minString.compare(currentString) < 0) {
      c = 1;
    } else if (minString.compare(currentString) > 0) {
      z = 1;
    }
  }
  if (c != 1 && z == 1) {
    unit = minString;
  }
  if (a.substr(0, l) == limiter) {
    normalSituation = false;
    for (int i = 1; i < x; ++i) {
      if (a.substr(i * l, l) != limiter) {
        normalSituation = true;
      }
    }
  }
  if (!normalSituation) {
    for (int i = 0; i < totalLength + l; ++i) {
      if (i % l == 0)
        result += '1';
      else
        result += '0';
    }
    return result;
  }
  if (unit.size() != l) {
    unit = addi(a.substr(0, l));
  }
  for (int i = 1; i <= x; i++) {
    for (int j = 0; j < l; j++) {
      result += unit[j];
    }
  }
  return result;
}
int main() {
  setup();
  cout << tackle();
}
