#include <bits/stdc++.h>
using namespace std;
string s;
int L;
int main() {
  while (cin >> L) {
    cin >> s;
    if (s.size() % L) {
      int n = s.size() / L + 1;
      for (int i = 0; i < n; i++) {
        cout << 1;
        for (int j = 0; j < L - 1; j++) {
          cout << 0;
        }
      }
    } else {
      bool need = true;
      int n = s.size() / L;
      for (int i = 1; i < n; i++) {
        bool ident = true;
        for (int j = 0; j < L; j++) {
          if (s[j] > s[j + i * L]) {
            need = false;
            ident = false;
            break;
          } else if (s[j] < s[j + i * L]) {
            need = true;
            ident = false;
            break;
          }
        }
        if (!ident) {
          break;
        }
      }
      if (need) {
        for (int i = L - 1; i >= 0; i--) {
          if (s[i] < '9') {
            s[i] = (char)(s[i] + 1);
            break;
          } else {
            s[i] = '0';
          }
        }
        if (s[0] != '0') {
          for (int i = 0; i < n; i++) {
            for (int j = 0; j < L; j++) {
              cout << s[j];
            }
          }
        } else {
          n++;
          for (int i = 0; i < n; i++) {
            cout << 1;
            for (int j = 0; j < L - 1; j++) {
              cout << 0;
            }
          }
        }
      } else {
        for (int i = 0; i < n; i++) {
          for (int j = 0; j < L; j++) {
            cout << s[j];
          }
        }
      }
    }
    cout << endl;
  }
  return 0;
}
