#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, p = 0;
  cin >> n;
  string s;
  cin >> s;
  vector<char> so, str;
  for (int i = 0; i < s.length(); i++) so.push_back(s[i]);
  vector<char> ans;
  int ct = 0;
  int len = s.length();
  if (len % n != 0) {
    p = len / n;
    p++;
    str.push_back('1');
    for (int i = 0; i < n - 1; i++) {
      str.push_back('0');
    }
    while (p--) {
      for (int i = 0; i < str.size(); i++) ans.push_back(str[i]);
    }
  } else {
    string pat = s.substr(0, n);
    p = 0;
    p = len / n;
    vector<char> ans1, ans2;
    for (int i = 0; i < p; i++) {
      for (int i = 0; i < pat.length(); i++) ans1.push_back(pat[i]);
    }
    if (ans1 > so) {
      ans.clear();
      ans = ans1;
    } else {
      int flag = 0;
      for (int i = pat.length() - 1; i >= 0; i--) {
        if (pat[i] == '9')
          pat[i] = '0';
        else {
          pat[i]++;
          flag = 1;
          break;
        }
      }
      for (int i = 0; i < p; i++) {
        for (int i = 0; i < pat.length(); i++) ans2.push_back(pat[i]);
      }
      ans = ans2;
      if (flag == 0) {
        ans.clear();
        p = len / n;
        p++;
        str.clear();
        str.push_back('1');
        for (int i = 0; i < n - 1; i++) {
          str.push_back('0');
        }
        while (p--) {
          for (int i = 0; i < str.size(); i++) ans.push_back(str[i]);
        }
      }
    }
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i];
  return 0;
}
