#include <bits/stdc++.h>
using namespace std;
int inf = 1e9;
const int N = 1e5 + 10;
string s, ans, temp;
int L, n, f, j, x;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> L >> s;
  n = s.size();
  if (n % L) {
    ans = "1";
    int i = 0;
    for (int j = 1; j < L; j++) ans += '0';
    while (1) {
      i += L;
      cout << ans;
      if (i >= n) break;
    }
    return 0;
  }
  temp = s.substr(0, L);
  ans = temp;
  int i = L;
  while (i < n) {
    ans += temp;
    i += L;
  }
  if (ans <= s) {
    for (int i = L - 1; i >= 0; i--) {
      if (temp[i] == '9')
        temp[i] = '0';
      else {
        temp[i]++;
        break;
      }
    }
    if (temp[0] == '0') {
      temp[0] = '1';
      n += L;
    }
    ans = "";
    for (int i = 1; i <= (n / L); i++) ans += temp;
  }
  cout << ans;
}
