#include <bits/stdc++.h>
const int mod = 998244353;
const double PI = acos(-1);
using namespace std;
int N, M, K;
string ss;
int check() {
  ss[ss.size() - 1]++;
  for (int i = ss.size() - 1; i; i--) {
    if (ss[i] > '9') {
      ss[i] = '0';
      ss[i - 1]++;
    }
  }
  if (ss[0] > '9') return false;
  return true;
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> N;
  string s1;
  cin >> s1;
  bool ok = false;
  if (s1.size() % N == 0) {
    ok = true;
  }
  if (ok) {
    int temp = s1.size() / N;
    string ss2;
    ss2 = s1.substr(0, N);
    int cnt = 0;
    do {
      ss = ss2;
      ss2 = s1.substr(N * cnt, N);
      cnt++;
    } while (ss == ss2);
    if (ss2.size() != N || ss2 >= ss) {
      if (check()) {
        while (temp) cout << ss, temp--;
      } else
        ok = false;
    } else {
      while (temp) cout << ss, temp--;
    }
  }
  if (!ok) {
    int temp = s1.size() / N + 1;
    ss.clear();
    ss += '1';
    while (--N) ss += '0';
    while (temp) cout << ss, temp--;
  }
  return 0;
}
