#include <bits/stdc++.h>
using namespace std;
string add(string str, int flag = -1) {
  reverse(str.begin(), str.end());
  int len = str.length();
  int carry = 1;
  string ans = "";
  for (int i = 0; i < len; i++) {
    int num = (str[i] - '0' + carry);
    carry = (num) / 10;
    num = num % 10;
    ans += (num + '0');
  }
  if (carry == 1) {
    string a = "1";
    for (int i = 1; i < 2 * len; i++) {
      a += '0';
      if (flag == 1 && i == len - 1) return a;
      if (i == len - 1) {
        a += '1';
        i++;
      }
    }
    return a;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
int main() {
  long long int n;
  cin >> n;
  string str;
  cin >> str;
  long long int len = str.length();
  if (n > len) {
    string ans = "1";
    for (long long int i = 2; i <= n; i++) {
      ans += '0';
    }
    cout << ans << endl;
    return 0;
  } else if (n == len) {
    string ans = add(str);
    cout << ans << endl;
    return 0;
  } else {
    if (len % n != 0) {
      string ans = "1";
      for (long long int i = 1; i < n; i++) {
        ans += '0';
      }
      string temp = ans;
      long long int l = n;
      while (l < len) {
        ans += temp;
        l += n;
      }
      cout << ans << endl;
      return 0;
    } else {
      string s = str.substr(0, n);
      string s1 = add(s, 1);
      long long int l = len / n - 1;
      string ans = s;
      string ans2 = s1;
      while (l > 0) {
        ans += s;
        ans2 += s1;
        l--;
      }
      if (ans > str) {
        cout << ans << endl;
        return 0;
      } else {
        if (ans2 > str)
          cout << ans2 << endl;
        else {
          ans2 += s1;
          cout << ans2 << endl;
        }
        return 0;
      }
    }
  }
  return 0;
}
