#include <bits/stdc++.h>
using namespace std;
const long long MXN = 1e6 + 1;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const long double EPS = 1e-9;
void sout(string t, int cnt) {
  while (cnt--) cout << t;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int l;
  string s;
  cin >> l >> s;
  int n = (int)s.size(), cnt = n / l;
  if (n % l) {
    string x = "1";
    while ((l--) - 1) x += '0';
    sout(x, cnt + 1);
    return 0;
  }
  bool ok = 0, den = 0;
  string pat = s.substr(0, l);
  for (int i = 0; i < n; i++)
    if (s[i] != '9') ok = 1;
  string w;
  for (int i = 1; i <= cnt; i++) w += pat;
  if (w <= s) den = 1;
  if (!ok) {
    string x = "1";
    while ((l--) - 1) x += '0';
    sout(x, cnt + 1);
  } else {
    if (den) {
      for (int i = (int)pat.size() - 1; i >= 0; i--) {
        if (pat[i] == '9')
          pat[i] = '0';
        else {
          pat[i] += 1;
          break;
        }
      }
      sout(pat, cnt);
    } else
      sout(pat, cnt);
  }
}
