#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1 << 62;
const long long MOD = 1e9 + 7;
const double PI = 3.14159265359;
const int iINF = 1 << 30;
int main() {
  int l;
  string s;
  cin >> l;
  cin >> s;
  if (s.size() == l) {
    int fnot9 = -1;
    for (int i = l - 1; i >= 0; i--) {
      if (s[i] - '0' < 9) {
        fnot9 = i;
        break;
      }
    }
    if (fnot9 == -1) {
      int sz = 0;
      while (sz < 2 * s.size()) {
        cout << 1;
        for (int i = 0; i < l - 1; i++) {
          cout << 0;
        }
        sz += l;
      }
      cout << "\n";
    } else {
      for (int i = 0; i < l; i++) {
        if (fnot9 == i)
          cout << int(s[i] - '0') + 1;
        else if (i > fnot9)
          cout << 0;
        else
          cout << s[i];
      }
      cout << "\n";
    }
  } else if (s.size() % l) {
    int sz = 0;
    while (sz < s.size()) {
      cout << 1;
      for (int i = 0; i < l - 1; i++) {
        cout << 0;
      }
      sz += l;
    }
    cout << "\n";
  } else {
    bool lflag = false;
    bool eflag = false;
    for (int i = 0; i < s.size(); i++) {
      int turn = i / l;
      int rem = i - turn * l;
      if (s[i] - '0' < s[rem] - '0') {
        lflag = false;
        eflag = false;
        break;
      } else if (s[i] - '0' > s[rem] - '0') {
        lflag = true;
        break;
      } else {
        eflag = true;
      }
    }
    int fnot9 = -1;
    for (int i = l - 1; i >= 0; i--) {
      if (s[i] - '0' != 9) {
        fnot9 = i;
        break;
      }
    }
    if (!lflag && !eflag) {
      int sz = 0;
      while (sz < s.size()) {
        for (int i = 0; i < l; i++) cout << s[i];
        sz += l;
      }
      cout << "\n";
    } else if (lflag) {
      int sz = 0;
      while (sz < s.size()) {
        for (int i = 0; i < l; i++) {
          if (i == fnot9)
            cout << int(s[i] - '0') + 1;
          else if (i > fnot9)
            cout << 0;
          else
            cout << s[i];
        }
        sz += l;
      }
      cout << "\n";
    } else {
      if (fnot9 == -1) {
        int sz = 0;
        while (sz < s.size() + l) {
          cout << 1;
          for (int i = 0; i < l - 1; i++) {
            cout << 0;
          }
          sz += l;
        }
        cout << "\n";
      } else {
        int sz = 0;
        while (sz < s.size()) {
          for (int i = 0; i < l; i++) {
            if (i == fnot9)
              cout << int(s[i] - '0') + 1;
            else if (i > fnot9)
              cout << 0;
            else
              cout << s[i];
          }
          sz += l;
        }
        cout << "\n";
      }
    }
  }
  return 0;
}
