#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int l;
  string s;
  cin >> l;
  cin >> s;
  if (int(s.size()) > l) {
    if (int(s.size()) % l) {
      int occur = ceil(int(s.size()) / double(l));
      while (occur--) {
        cout << 1;
        for (int i = 1; i < l; ++i) cout << 0;
      }
    } else {
      int occur = int(s.size()) / l;
      int t = occur;
      string x = "";
      while (t--)
        for (int i = 0; i < l; ++i) {
          x += s[i];
        }
      if (s.compare(x) < 0) {
        cout << x;
        return 0;
      }
      bool can = true;
      int i = l - 1;
      while (s[i] == '9') {
        s[i] = '0';
        i--;
        if (i < 0) {
          can = false;
          break;
        }
      }
      if (!can) {
        occur++;
        while (occur--) {
          cout << 1;
          for (int i = 1; i < l; ++i) cout << 0;
        }
      } else {
        s[i]++;
        while (occur--) {
          for (int i = 0; i < l; ++i) cout << s[i];
        }
      }
    }
  } else if (int(s.size()) < l) {
    cout << 1;
    for (int i = 1; i < l; ++i) cout << 0;
  } else {
    int i = int(s.size()) - 1;
    bool can = true;
    while (s[i] == '9') {
      s[i] = '0';
      i--;
      if (i < 0) {
        can = false;
        break;
      }
    }
    if (!can) {
      for (int j = 0; j < 2; ++j) {
        cout << 1;
        for (int v = 1; v < int(s.size()); ++v) cout << 0;
      }
    } else {
      s[i]++;
      cout << s;
    }
  }
}
