#include <bits/stdc++.h>
using namespace std;
long long e[2000000];
int main() {
  long long n;
  string s;
  cin >> n;
  cin >> s;
  long long len = s.size();
  if (n > len) {
    cout << "1";
    for (int i = 2; i <= n; i++) {
      cout << "0";
    }
    cout << endl;
    return 0;
  }
  if (n == len) {
    for (int i = 0; i < len; i++) {
      e[i] = s[i] - '0';
    }
    long long val = 1;
    for (int i = len - 1; i >= 0; i--) {
      e[i] = e[i] + val;
      val = e[i] / 10;
      e[i] %= 10;
    }
    if (val == 1) {
      long long m = 2;
      for (int i = 0; i < m; i++) {
        for (int j = 0; j < n; j++) {
          if (j == 0) {
            cout << "1";
          } else {
            cout << "0";
          }
        }
      }
      cout << endl;
    } else {
      for (int i = 0; i < len; i++) {
        cout << e[i];
      }
      cout << endl;
    }
    return 0;
  }
  if (len % n != 0) {
    long long m = len / n + 1;
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < n; j++) {
        if (j == 0) {
          cout << "1";
        } else {
          cout << "0";
        }
      }
    }
    cout << endl;
  } else {
    long long flag = 0;
    for (int i = 0; i < len; i++) {
      if (s[i] != '9') {
        flag = 1;
        break;
      }
    }
    if (flag) {
      long long op = 0;
      for (int i = 0; i < len; i++) {
        if ((s[i % n] - '0') < (s[i] - '0')) {
          break;
        }
        if ((s[i % n] - '0') > (s[i] - '0')) {
          op = 1;
          break;
        }
      }
      if (op == 1) {
        long long m = len / n;
        for (int i = 0; i < m; i++) {
          for (int j = 0; j < n; j++) {
            cout << s[j] - '0';
          }
        }
        cout << endl;
        return 0;
      }
      for (int i = 0; i < n; i++) {
        e[i] = s[i] - '0';
      }
      long long val = 1;
      for (int i = n - 1; i >= 0; i--) {
        e[i] = e[i] + val;
        val = e[i] / 10;
        e[i] %= 10;
      }
      long long m = len / n;
      if (val == 1) {
        for (int i = 0; i < m; i++) {
          for (int j = 0; j < n; j++) {
            cout << "9";
          }
        }
        cout << endl;
      } else {
        for (int i = 0; i < m; i++) {
          for (int j = 0; j < n; j++) {
            cout << e[j];
          }
        }
        cout << endl;
      }
    } else {
      long long m = len / n + 1;
      for (int i = 0; i < m; i++) {
        for (int j = 0; j < n; j++) {
          if (j == 0) {
            cout << "1";
          } else {
            cout << "0";
          }
        }
      }
      cout << endl;
    }
  }
  return 0;
}
