#include <bits/stdc++.h>
using namespace std;
void case1(int n, int f) {
  string s;
  s += '1';
  for (int i = 0; i < n - 1; i++) s += '0';
  while (f--) cout << s;
}
int main() {
  int p;
  string a;
  cin >> p >> a;
  int n = a.size();
  if (n % p) {
    int t = ceil((double)n / (double)p);
    case1(p, t);
    return 0;
  }
  string mn;
  for (int i = 0; i < p; i++) mn += a[i];
  int i = 0;
  while (1) {
    int si = i + p;
    string that;
    for (; i < si; i++) that += a[i];
    if (that < mn) {
      for (int i = 0; i < n / p; i++) cout << mn;
      return 0;
    }
    i = si;
    if (i == n) break;
  }
  bool flg = 0;
  for (int i = p - 1; i > -1; i--)
    if (a[i] != '9') flg = 1;
  if (!flg) {
    case1(p, n / p + 1);
    return 0;
  }
  for (int i = p - 1; i > -1; i--) {
    if (a[i] == '9')
      a[i] = '0';
    else {
      a[i]++;
      break;
    }
  }
  string rep;
  for (int i = 0; i < p; i++) rep += a[i];
  int times = n / p;
  while (times--) cout << rep;
  return 0;
}
