#include <bits/stdc++.h>
using namespace std;
int n, m, k;
string s, ans;
void solve(string ss, int t) {
  for (int i = 1; i <= t; i++) {
    cout << ss;
  }
}
int main() {
  scanf("%d", &n);
  cin >> s;
  int len = s.size();
  if (len % n == 0) {
    int flag = 0;
    int cnt = -1;
    for (int j = 0; j < n; j++) {
      ans += s[j];
    }
    for (int i = 1; i <= len / n; i++) {
      for (int j = 0; j < n; j++) {
        cnt++;
        if (s[cnt] < s[j]) {
          solve(ans, len / n);
          return 0;
        } else if (s[cnt] == s[j]) {
          continue;
        } else {
          flag = 1;
          break;
        }
      }
      if (flag) break;
    }
    flag = 1;
    for (int i = n - 1; i >= 0; i--) {
      if (flag == 0) break;
      if (s[i] == '9') {
        flag = 1;
        s[i] = '0';
      } else {
        s[i]++;
        flag = 0;
      }
    }
    ans.clear();
    if (flag == 1) {
      ans += '1';
      for (int i = 1; i < n; i++) {
        ans += '0';
      }
      solve(ans, len / n + 1);
    } else {
      for (int j = 0; j < n; j++) {
        ans += s[j];
      }
      solve(ans, len / n);
    }
  } else {
    for (int i = 0; i <= len / n; i++) {
      printf("1");
      for (int j = 1; j < n; j++) {
        printf("0");
      }
    }
    printf("\n");
  }
}
