#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1000;
const long long INF64 = 1e18 + 1000;
const int N = 6 * 100 * 1000 + 100;
const int MOD = 1e9 + 7;
long long gcd(long long a, long long b) { return a == 0 ? b : gcd(b % a, a); }
long long binpow(long long a, long long b) {
  if (b < 0) return 1;
  if (b % 2) return a * binpow(a, b - 1);
  long long t = binpow(a, b / 2);
  return t * t;
}
void spr(int x) { cout << setprecision(x) << fixed; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  string s;
  cin >> n >> s;
  bool ok = false;
  for (int i = 0; i < int(s.size()); ++i)
    if (s[i] != '9') ok = true;
  if (!ok) {
    int mem = s.size();
    s = "1";
    for (int i = 0; i < int(mem); ++i) s += "0";
  }
  if (n > s.size()) {
    cout << 1;
    for (int i = 0; i < int(n - 1); ++i) cout << 0;
    return 0;
  }
  if (s.size() % n) {
    int add = n - s.size() % n;
    int loop = (s.size() + n - s.size() % n) / n;
    for (int i = 0; i < int(loop); ++i) {
      cout << 1;
      for (int z = 0; z < int(n - 1); ++z) cout << 0;
    }
    return 0;
  }
  bool ex = false;
  int pos = 0;
  string ans = "";
  string period = "";
  for (int i = 0; i < int(n); ++i) period += "9";
  string cur = s.substr(pos, pos + n);
  string per = cur;
  bool can = false;
  while (pos < s.size()) {
    string cur2 = s.substr(pos, n);
    if (cur < cur2) {
      break;
    } else if (cur > cur2) {
      can = true;
      break;
    }
    pos += n;
  }
  if (can) {
    for (int i = 0; i < int(s.size() / n); ++i) cout << cur;
    return 0;
  }
  for (int i = int(n) - 1; i >= 0; --i) {
    if (cur[i] < '9') {
      per[i] = cur[i] + 1;
      for (int z = int(i + 1); z < int(n); ++z) per[z] = '0';
      for (int q = 0; q < int(s.size() / n); ++q) cout << per;
      return 0;
    }
  }
}
