#include <bits/stdc++.h>
using namespace std;
const int nmax = 100000 + 7;
int l;
string s;
void input() {
  cin >> l;
  cin >> s;
}
string addone(string a) {
  bool flag = true;
  for (int i = a.length() - 1; i >= 0; --i) {
    if (a[i] - '0' + flag == 10) {
      a[i] = '0';
      flag = true;
    } else {
      int num = (a[i] - '0' + flag);
      a[i] = (char)num + '0';
      flag = false;
    }
  }
  if (flag) {
    a = "1" + a;
  }
  return a;
}
void solve() {
  if (s.length() % l == 0) {
    if (s.length() == l) {
      cout << addone(s);
      exit(0);
    }
    string ans = "";
    string x = s.substr(0, l);
    ans = x;
    bool flag = false;
    for (int i = l; i < s.length(); i += l) {
      int check = ans.compare(s.substr(i, l));
      if (check < 0) {
        ans = addone(ans);
        flag = true;
        break;
      }
      if (check > 0) {
        flag = true;
        break;
      }
    }
    if (!flag) ans = addone(ans);
    bool fl = false;
    if (ans.length() > l) ans = ans.substr(0, l), fl = true;
    for (int i = 0; i < s.length() / l + fl; ++i) cout << ans;
  } else {
    if (l > s.length()) {
      cout << 1;
      for (int i = 0; i < l - 1; ++i) {
        cout << 0;
      }
    } else {
      string ans = "1";
      for (int i = 0; i < l - 1; ++i) {
        ans += "0";
      }
      for (int i = 0; i < s.length() / l + 1; ++i) {
        cout << ans;
      }
    }
  }
}
void sinhtest() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  input();
  solve();
  return 0;
}
