#include <bits/stdc++.h>
using namespace std;
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class T>
ostream& operator<<(ostream& os, multiset<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.F << ":" << m.S << ") ";
  return os << "}";
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " |";
  __f(comma + 1, args...);
}
const int mod = 1e7 + 7;
const int N = 2e5;
inline int fast_expo(int base, int power, int modulo = mod) {
  base %= modulo;
  if (base < 0) base += modulo;
  long long x = base, cnt = power, ans = 1;
  while (cnt) {
    if (cnt & 1) ans = (ans * x) % modulo;
    x = (x * x) % modulo;
    cnt >>= 1;
  }
  return ans;
}
inline int inv(int base, int modulo = mod) {
  return fast_expo(base, modulo - 2, modulo);
}
void solve() {
  int l;
  cin >> l;
  string str;
  cin >> str;
  int n = str.length();
  if (n % l) {
    string pat2 = "1";
    pat2.insert(pat2.end(), l - 1, '0');
    for (int i = 0; i <= str.length() / l; ++i) {
      cout << pat2;
    }
    cout << '\n';
    return;
  }
  string pat = str.substr(0, l);
  string ans;
  for (int i = 0; i < str.length() / l; ++i) {
    ans.insert(ans.end(), pat.begin(), pat.end());
  }
  if (ans > str) {
    cout << ans << '\n';
    return;
  }
  if (count(pat.begin(), pat.end(), '9') == l) {
    string pat1 = "1";
    pat1.insert(pat1.end(), l - 1, '0');
    for (int i = 0; i <= str.length() / l; ++i) {
      cout << pat1;
    }
    cout << '\n';
    return;
  }
  int ci = l - 1;
  while (ci and pat[ci] == '9') {
    pat[ci] = '0';
    ci--;
  }
  pat[ci]++;
  for (int i = 0; i < str.length() / l; ++i) {
    cout << pat;
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1, tc = 1;
  while (T--) {
    solve();
  }
  return 0;
}
