#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
clock_t clk = clock();
long long int i, j, k;
void solve(void);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int t = 1;
  while (t--) solve();
  return 0;
}
void solve() {
  long long int l;
  cin >> l;
  string a;
  cin >> a;
  string ans;
  if ((int)a.size() % l == 0) {
    string t;
    for (i = 0; i <= l - 1; ++i) t += a[i];
    int car = -1;
    for (i = l; i < (int)a.size(); i += l) {
      string temp;
      for (j = i; j <= i + l - 1; ++j) temp += a[j];
      if (temp < t) {
        car = 0;
        break;
      } else if (temp > t) {
        car = 1;
        break;
      }
    }
    if (car == -1) car = 1;
    for (i = l - 1; i >= 0; --i) {
      int newcar = (t[i] - '0' + car) / 10;
      t[i] = (t[i] - '0' + car) % 10 + '0';
      car = newcar;
    }
    if (car == 1) {
      t = '1';
      for (i = 1; i <= l - 1; ++i) t += '0';
      for (i = 1; i <= (int)a.size() / l + 1; ++i) ans += t;
    } else
      for (i = 1; i <= (int)a.size() / l; ++i) ans += t;
  } else {
    string t;
    t = '1';
    for (i = 1; i <= l - 1; ++i) t += '0';
    for (i = 1; i <= ceil((int)a.size() / float(l)); ++i) ans += t;
  }
  cout << ans << '\n';
}
