#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MOD = 1e4 + 7;
const int maxn = 1000005;
const int MAXN = 100010;
const int INF = 0x3f3f3f3f;
int a[maxn];
int main() {
  string s;
  int L;
  cin >> L;
  cin >> s;
  if (s.size() >= L) {
    bool flag = true;
    for (int i = 0; i < L; ++i) a[i] = s[i] - '0';
    if (s.size() % L == 0) {
      bool Acepty = true;
      bool stuas = true;
      for (int i = L; i < s.size() && Acepty; i += L) {
        for (int j = 0; j < L && i + j < s.size(); ++j) {
          if (a[j] > s[i + j] - '0') {
            stuas = false;
            break;
          } else if (a[j] < s[i + j] - '0') {
            Acepty = false;
            break;
          }
        }
      }
      if (stuas) {
        int res = 1;
        for (int i = L - 1; i >= 0; --i) {
          res = res + a[i];
          a[i] = res % 10;
          res /= 10;
          if (res && i == 0) flag = false;
        }
      }
    } else {
      int res = 1;
      for (int i = L - 1; i >= 0; --i) {
        res = res + a[i];
        a[i] = res % 10;
        res /= 10;
        if (res && i == 0) {
          flag = false;
        }
      }
    }
    if (!flag || s.size() % L) {
      a[0] = 1;
      for (int i = 1; i < L; ++i) a[i] = 0;
      int tp = s.size() / L + 1;
      for (int i = 0; i < tp; ++i) {
        for (int j = 0; j < L; ++j) cout << a[j];
      }
      cout << endl;
    } else {
      int tp = s.size() / L;
      for (int i = 0; i < tp; ++i) {
        for (int j = 0; j < L; ++j) cout << a[j];
      }
      cout << endl;
    }
  } else {
    memset(a, 0, sizeof a);
    a[0] = 1;
    for (int i = 0; i < L; ++i) cout << a[i];
    cout << endl;
  }
  return 0;
}
