#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535897932;
int a[30];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string a;
  int l;
  cin >> l >> a;
  if (l > a.size()) {
    cout << 1;
    for (int i = 0; i < l - 1; i++) cout << 0;
  } else if (l == a.size()) {
    int ch = 0;
    for (int i = a.size() - 1; i >= 0; i--) {
      if (a[i] != '9') {
        a[i] = char(a[i] + 1);
        ch = 1;
        for (int r = i + 1; r < a.size(); r++) a[r] = '0';
        break;
      }
    }
    if (ch)
      cout << a << '\n';
    else {
      cout << 1;
      for (int i = 0; i < l - 1; i++) cout << 0;
      cout << 1;
      for (int i = 0; i < l - 1; i++) cout << 0;
    }
  } else {
    if (a.size() % l == 0) {
      string sub = a.substr(0, l);
      string ans = "";
      int n = a.size() / l;
      while (n--) {
        ans += sub;
      }
      if (ans > a)
        cout << ans << '\n';
      else {
        int ch = 0;
        for (int i = sub.size() - 1; i >= 0; i--) {
          if (sub[i] != '9') {
            sub[i] = char(sub[i] + 1);
            ch = 1;
            for (int r = i + 1; r < sub.size(); r++) sub[r] = '0';
            break;
          }
        }
        if (ch) {
          n = a.size() / l;
          ans = "";
          while (n--) {
            ans += sub;
          }
          cout << ans << '\n';
        } else {
          n = a.size() / l + 1;
          while (n--) {
            cout << 1;
            for (int i = 0; i < l - 1; i++) cout << 0;
          }
        }
      }
    } else {
      int n = a.size() / l + bool(a.size() % l);
      while (n--) {
        cout << 1;
        for (int i = 0; i < l - 1; i++) cout << 0;
      }
    }
  }
}
