#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18;
const long long int MAX = 200001;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int l;
  cin >> l;
  string s;
  cin >> s;
  long long int n = s.length();
  long long int num;
  string r, t, u;
  if (n % l != 0) {
    num = (n - 1) / l + 1;
    r = "1";
    for (long long int i = 0; i < l - 1; i++) r += '0';
    for (long long int i = 0; i < num; i++) cout << r;
    cout << "\n";
  } else {
    num = n / l;
    r = s.substr(0, l);
    for (long long int i = 0; i < l; i++) u += '9';
    if (r == u) {
      u = "1";
      for (long long int i = 0; i < l - 1; i++) u += '0';
      for (long long int i = 0; i < num + 1; i++) cout << u;
      cout << "\n";
      return 0;
      ;
    }
    for (long long int i = 0; i < num; i++) {
      t += r;
    }
    if (t <= s) {
      for (long long int i = l - 1; i >= 0; i--) {
        if (r[i] == '9') {
          r[i] = '0';
          continue;
        } else {
          r[i] += 1;
          break;
        }
      }
      for (long long int i = 0; i < num; i++) cout << r;
      cout << "\n";
    } else {
      for (long long int i = 0; i < num; i++) cout << r;
      cout << "\n";
    }
  }
  return 0;
  ;
}
