#include <bits/stdc++.h>
using namespace std;
char s[100005];
char ans[100005];
char ans2[100005];
int main() {
  int n;
  scanf("%d%s", &n, s);
  int len = strlen(s);
  if (len % n != 0) {
    for (int i = 0; i < len / n + 1; i++) {
      printf("1");
      for (int j = 1; j < n; j++) {
        printf("0");
      }
    }
    printf("\n");
  } else {
    int flag = 0;
    for (int i = 0; i < n; i++) {
      ans[i] = s[i];
      if (ans[i] != '9') flag = 1;
    }
    for (int i = n; i < len; i++) {
      if (s[i] != '9') {
        flag = 1;
        break;
      }
    }
    ans[n] = '\0';
    if (flag == 0) {
      for (int i = 0; i < len / n + 1; i++) {
        printf("1");
        for (int j = 1; j < n; j++) {
          printf("0");
        }
      }
      printf("\n");
    } else {
      if (n == len) {
        int flag = 1;
        for (int i = n - 1; i >= 0; i--) {
          if (flag == 1) {
            if (ans[i] != '9') {
              ans[i]++;
              flag = 0;
            } else {
              ans[i] = '0';
            }
          }
        }
        for (int i = 0; i < len / n; i++) {
          for (int j = 0; j < n; j++) printf("%c", ans[j]);
        }
        printf("\n");
      } else {
        for (int h = 1; h < len / n; h++) {
          for (int i = h * n; i < (h + 1) * n; i++) {
            ans2[i - h * n] = s[i];
            ans2[n] = '\0';
          }
          if (strcmp(ans, ans2) > 0) {
            for (int i = 0; i < len / n; i++) {
              printf("%s", ans);
            }
            printf("\n");
            break;
          } else if (strcmp(ans, ans2) < 0) {
            int flag = 1;
            for (int i = n - 1; i >= 0; i--) {
              if (flag == 1) {
                if (ans[i] != '9') {
                  ans[i]++;
                  flag = 0;
                } else {
                  ans[i] = '0';
                }
              }
            }
            for (int i = 0; i < len / n; i++) {
              for (int j = 0; j < n; j++) printf("%c", ans[j]);
            }
            printf("\n");
            break;
          }
          if (strcmp(ans, ans2) == 0 && (h + 1) * n == len) {
            int flag = 1;
            for (int i = n - 1; i >= 0; i--) {
              if (flag == 1) {
                if (ans[i] != '9') {
                  ans[i]++;
                  flag = 0;
                } else {
                  ans[i] = '0';
                }
              }
            }
            for (int i = 0; i < len / n; i++) {
              for (int j = 0; j < n; j++) printf("%c", ans[j]);
            }
            printf("\n");
            break;
          }
        }
      }
    }
  }
  return 0;
}
