#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
void err(istream_iterator<string> it) { cout << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << " ";
  err(++it, args...);
}
int main() {
  int l;
  string a;
  cin >> l >> a;
  fast();
  if ((int)((a).size()) % l != 0) {
    string kerr = "1", res = "";
    for (int i = 0; i < l - 1; i++) kerr += "0";
    while ((int)((res).size()) < (int)((a).size())) res += kerr;
    cout << res;
    return 0;
  }
  string ker = a.substr(0, l), t = "";
  while ((int)((t).size()) < (int)((a).size())) t += ker;
  if (t > a) {
    cout << t;
    return 0;
  }
  bool good = 0;
  for (char ch : ker) good |= (ch != '9');
  if (good) {
    for (int i = (int)((ker).size()) - 1; i >= 0; i--) {
      if (ker[i] != '9') {
        ker[i] += 1;
        break;
      } else
        ker[i] = '0';
    }
    string res = "";
    while ((int)((res).size()) < (int)((a).size())) res += ker;
    cout << res;
    return 0;
  }
  string kerr = "1", res = "";
  for (int i = 0; i < l - 1; i++) kerr += "0";
  while ((int)((res).size()) <= (int)((a).size())) res += kerr;
  cout << res;
}
