#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int l;
  string s;
  cin >> l;
  cin >> s;
  int n = s.length();
  if (l > n) {
    cout << '1';
    for (int i = 0; i < l - 1; ++i) cout << '0';
    cout << endl;
  } else if (n % l != 0) {
    string t = "1";
    for (int i = 0; i < l - 1; ++i) t = t + '0';
    for (int i = 0; i < n / l + 1; ++i) cout << t;
    cout << endl;
  }
  if (n % l == 0) {
    int all_9 = 1;
    for (int i = 0; i < n; ++i)
      if (s[i] != '9') {
        all_9 = 0;
        break;
      }
    if (all_9) {
      string t = "1";
      for (int i = 0; i < l - 1; ++i) t = t + '0';
      for (int i = 0; i < n / l + 1; ++i) cout << t;
      cout << endl;
      return 0;
    }
    string x = s.substr(0, l);
    int all_greater_mx = 1;
    for (int i = l; i < n; i += l) {
      if (s.substr(i, l) < x) {
        all_greater_mx = 0;
        break;
      }
    }
    if (all_greater_mx) {
      for (int i = l - 1; i >= 0; --i) {
        if (x[i] == '9')
          x[i] = '0';
        else {
          x[i] += 1;
          break;
        }
      }
      for (int i = 0; i < n / l; ++i) cout << x;
      cout << endl;
      return 0;
    }
    for (int i = 0; i < n / l; ++i) cout << x;
    cout << endl;
  }
  return 0;
}
