#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int64_t n, k;
  cin >> k;
  string s;
  cin >> s;
  n = s.size();
  if (n % k != 0) {
    int64_t l = (n + k - 1) / k;
    for (int64_t i = 0; i < l; i++) {
      cout << 1;
      for (int64_t j = 0; j < k - 1; j++) {
        cout << 0;
      }
    }
    cout << endl;
    return 0;
  }
  string t = s;
  for (int64_t i = k; i < n; i++) {
    t[i] = t[i - k];
  }
  if (t > s) {
    cout << t << endl;
  } else {
    int64_t l = -1;
    for (int64_t i = k - 1; i >= 0; i--) {
      if (s[i] != '9') {
        s[i]++;
        l = i;
        break;
      }
    }
    if (l != -1) {
      for (int64_t i = k - 1; i > l; i--) {
        s[i] = '0';
      }
    } else {
      int64_t p = n / k;
      p++;
      for (int64_t i = 0; i < p; i++) {
        cout << 1;
        for (int64_t j = 0; j < k - 1; j++) {
          cout << 0;
        }
      }
      cout << endl;
      return 0;
    }
    for (int64_t i = k; i < n; i++) {
      s[i] = s[i - k];
    }
    cout << s << endl;
  }
}
