#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1.0) * 4;
const long long int INF = 100000000000000003;
const int32_t LOG = 21;
const long long int BIG = pow(2, 20) + 1;
string increment(string str) {
  long long int l = str.length();
  char* ch = new char[str.length()];
  long long int carry = 1;
  for (long long int i = l - 1; i >= 0; i--) {
    long long int x = str[i] - '0';
    x += carry;
    if (x >= 10)
      carry = 1;
    else
      carry = 0;
    long long int t = x % 10;
    ch[i] = t + '0';
  }
  if (carry == 1) return "na";
  string ans = "";
  for (long long int i = 0; i < l; i++) ans += ch[i];
  return ans;
}
void print(string str, long long int n, long long int tot) {
  for (long long int i = 0; i < tot; i++) cout << str;
  cout << '\n';
  exit(0);
}
bool good(string& ans, string& str, long long int l, long long int r,
          long long int last) {
  long long int x = 0;
  for (long long int i = l; i < r + 1; i++) {
    if (ans[i - l] < str[i]) return false;
    if (ans[i - l] > str[i]) {
      x = 1;
      break;
    }
  }
  if (last == 1 && x == 0) return false;
  return true;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int l;
  cin >> l;
  string str;
  cin >> str;
  long long int n = str.length();
  if (str.length() % l != 0) {
    string str1 = "1";
    for (long long int i = 1; i < l; i++) str1 += '0';
    long long int tot = (n / l) + 1;
    for (long long int i = 0; i < tot; i++) cout << str1;
    cout << '\n';
    return 0;
  }
  string ans = "";
  string ans1 = "";
  for (long long int i = 0; i < l; i++) ans += str[i];
  ans1 = increment(ans);
  if (ans1 == "na") {
    string str1 = "1";
    for (long long int i = 1; i < l; i++) str1 += '0';
    for (long long int i = 0; i < (n / l) + 1; i++) cout << str1;
    cout << '\n';
    return 0;
  }
  long long int second = 0, e = l - 1;
  bool g = true;
  while (e < n) {
    long long int signal = 0;
    if (e == n - 1) signal = 1;
    if (!good(ans, str, second, e, signal)) {
      g = false;
      break;
    }
    second += l;
    e += l;
  }
  if (g) {
    print(ans, str.length(), n / l);
  } else {
    print(ans1, str.length(), n / l);
  }
  return 0;
}
