#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const int maxn = 2e5 + 10;
const int maxm = 1e5 + 10;
int n;
char num[maxn];
int main() {
  cin >> n >> num;
  int len = strlen(num);
  if (len % n) {
    num[0] = '1';
    for (int i = 1; i < n; ++i) num[i] = '0';
  } else {
    int flag = 0, cnt = n;
    for (int i = n; i < len; ++i) {
      if (num[i] > num[i % n])
        flag = 1;
      else if (num[i] < num[i % n])
        break;
    }
    for (int i = n; i < len; ++i)
      if (num[i] == num[i % n]) ++cnt;
    flag |= cnt == len;
    cnt = 0;
    for (int i = 0; i < n; ++i)
      if (num[i] == '9') ++cnt;
    if (flag && cnt == n) {
      ++len;
      num[0] = '1';
      for (int i = 1; i < n; ++i) num[i] = '0';
    } else if (flag) {
      for (int i = n - 1; i >= 0; --i) {
        num[i] = num[i] - '0' + flag;
        flag = num[i] / 10;
        num[i] = num[i] % 10 + '0';
      }
    }
  }
  len = (len + n - 1) / n * n;
  for (int i = n; i < len; ++i) num[i] = num[i % n];
  cout << num << '\n';
  return 0;
}
