#include <bits/stdc++.h>
using namespace std;
const int N = 1101100, M = 100100;
int h[N], e[M], ne[M], idx;
void add(int a, int b) { e[idx] = b, ne[idx] = h[a], h[a] = idx++; }
int main() {
  int k, n;
  cin >> k;
  string second;
  cin >> second;
  n = second.size();
  string res;
  if (n % k != 0) {
    string tt;
    tt += "1";
    for (int i = 0; i < k - 1; i++) {
      tt += "0";
    }
    res = tt;
    for (int i = 0; i < n / k; i++) {
      res += tt;
    }
    cout << res;
  } else {
    string tt;
    vector<int> aa;
    bool first = false;
    string sb = second.substr(0, k);
    int l = 0;
    while (l < n && sb >= second.substr(l, k)) {
      if (sb > second.substr(l, k)) first = true;
      l += k;
    }
    if (l == n) {
      bool fl = false;
      for (int i = 0; i < k; i++)
        if (sb[i] != '9') fl = true;
      if (!fl && !first) {
        sb = "1";
        for (int i = 0; i < k - 1; i++) sb += "0";
        for (int i = 0; i < n / k + 1; i++) {
          res += sb;
        }
        cout << res;
        return 0;
      }
      int cc = n / k;
      if (!first) {
        int jin = 1;
        for (int i = sb.size() - 1; i >= 0; i--) {
          if (!jin) break;
          if (sb[i] == '9') {
            sb[i] = '0';
          } else {
            if (jin) {
              sb[i] += 1;
              jin = 0;
            } else {
              break;
            }
          }
        }
      }
      for (int i = 0; i < cc; i++) res += sb;
      cout << res;
      return 0;
    }
    for (int i = 0; i < k; i++) {
      aa.push_back(second[i] - '0');
    }
    int jin = 0;
    aa.back()++;
    while (!aa.empty()) {
      aa.back() += jin;
      if (aa.back() >= 10) {
        tt += (aa.back() - 10 + '0');
        jin = 1;
        aa.pop_back();
      } else {
        jin = 0;
        tt += (aa.back() + '0');
        aa.pop_back();
      }
    }
    if (jin > 0) {
      tt += "1";
    }
    reverse(tt.begin(), tt.end());
    int num = n / k - 1;
    if (tt.size() > k) {
      tt = second.substr(0, k);
      res = tt;
      while (res <= second) {
        res += tt;
      }
      cout << res;
      return 0;
    }
    res = tt;
    for (int i = 0; i < num; i++) {
      res += tt;
    }
    cout << res;
  }
  return 0;
}
