#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  register char ch = getchar();
  int pd = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') pd = -pd;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= pd;
}
template <typename T>
void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x < 10)
    putchar(x + 48);
  else
    print(x / 10), putchar(x % 10 + 48);
}
template <typename T>
void print(T x, char t) {
  print(x);
  putchar(t);
}
bool sortbysec(const pair<long long, pair<long long, long long> > &a,
               const pair<long long, pair<long long, long long> > &b) {
  if (a.first != b.first) {
    return (a.first < b.first);
  } else {
    return a.second.first > b.second.first;
  }
}
void init() {}
string s, st;
long long x, y, k, t;
long long n, m, l, r, c, q, h, d, v, w, a, b;
long long mx = 1e9 + 1;
const long long nx = 1e5 + 1;
bool ar[nx];
vector<long long> num[nx];
vector<long long> E[nx];
bool cmp1(long long n, pair<long long, pair<long long, long long> > const &p) {
  return (p.first > n);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  init();
  cin >> n >> k >> s;
  st = s;
  for (long long(i) = (k); (i) < (n); ++(i)) s[i] = s[i - k];
  if (st <= s) {
    cout << n << '\n';
    cout << s << '\n';
  } else {
    l = k - 1;
    while (l > 0 && s[l] == '9') l--;
    for (long long(i) = (l + 1); (i) < (k); ++(i)) s[i] = '0';
    s[l]++;
    for (long long(i) = (k); (i) < (n); ++(i)) s[i] = s[i - k];
    cout << n << '\n';
    cout << s << '\n';
  }
  return 0;
}
