#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  int k;
  cin >> k;
  string s;
  cin >> s;
  int n = s.length();
  bool flag = 1;
  for (int i = 0; i < n; ++i) flag &= (s[i] == '9');
  if (n % k or flag) {
    string t(k, '0');
    t.front() = '1';
    for (int i = 0; i < n / k + 1; ++i) cout << t;
    return 0;
  }
  string t(s.begin(), s.begin() + k);
  int eq = 0;
  for (int i = 0; i < n; i += k) {
    string x = s.substr(i, k);
    eq += (x == t);
    if (x < t) break;
    if (x > t or eq == n / k) {
      reverse(t.begin(), t.end());
      int m = t.length(), c = 1;
      for (int j = 0; j < m; ++j) {
        t[j] += c;
        if (t[j] == '9' + 1)
          t[j] = '0';
        else
          c = 0;
      }
      reverse(t.begin(), t.end());
      break;
    }
  }
  for (int i = 0; i < n / k; ++i) cout << t;
  return 0;
}
