#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
map<int, int> m;
int cnt, tmp, ans, rs;
using namespace std;
int toint(char c) { return c - '0'; }
char toletter(int x) { return (char)(x + 48); }
void ins(string &a, string &b) {
  int l1 = a.length();
  int l2 = b.length();
  if (l2 >= l1) {
    a.insert(0, l2 - l1, '0');
  } else {
    b.insert(0, l1 - l2, '0');
  }
}
string pls(string a, string b) {
  string s = "";
  ins(a, b);
  int l1 = a.length();
  int temp = 0;
  for (int i = l1 - 1; i >= 0; i--) {
    temp = toint(a[i]) + toint(b[i]) + temp;
    s.insert(0, 1, toletter(temp % 10));
    temp = temp / 10;
  }
  if (temp > 0) {
    s.insert(0, 1, toletter(temp));
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int l;
  cin >> l;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '9') {
      tmp = 1;
      break;
    }
  }
  if (s.size() % l != 0 || tmp == 0) {
    cnt = s.size() / l + 1;
    string s1 = "1";
    for (int i = 0; i < l - 1; i++) s1 += '0';
    for (int i = 0; i < cnt; i++) cout << s1;
  } else {
    string s1 = "", s2 = "";
    for (int i = 0; i < l; i++) {
      s1 += s[i];
    }
    for (int i = 0; i < s.size() / l; i++) s2 += s1;
    if (s.compare(s2) < 0)
      cout << s2;
    else {
      s1 = pls(s1, "1");
      string s3 = "";
      for (int i = 0; i < s.size() / l; i++) s3 += s1;
      cout << s3;
    }
  }
}
