#include <bits/stdc++.h>
using namespace std;
char x[200005];
int a[200005];
int b[200005];
int c[200005];
int n, m;
int cnt = 1;
bool judge(int x) {
  for (int i = 0; i < m; i++) {
    b[i + 1] = a[i];
  }
  b[m] += x;
  for (int i = m; i >= cnt; i--) {
    if (b[1] > 9) {
      cnt = 0;
    }
    if (b[i] > 9) {
      b[i - 1] += b[i] / (9 + 1);
      b[i] = b[i] % (9 + 1);
    }
  }
  for (int i = cnt; i <= n; i++) {
    int h;
    if (cnt == 1) {
      h = i % m;
      if (h == 0) {
        h = m;
      }
    } else {
      if (i == 0) {
        h = 0;
      }
    }
    c[i] = b[h];
  }
  if (cnt == 0) {
    return true;
  }
  int s = cnt;
  for (int i = 0; i < n; i++) {
    if (c[s] > a[i]) {
      return true;
    }
    if (c[s] < a[i]) {
      return false;
    }
    s++;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m;
  cin >> x;
  for (int i = 0; i < n; i++) {
    a[i] = x[i] - '0';
  }
  for (int i = 0; i < m; i++) {
    b[i + 1] = a[i];
  }
  int ans = 0;
  for (int i = 0;; i++) {
    if (judge(i)) {
      break;
    }
  }
  if (cnt == 1) {
    cout << n << "\n";
  } else {
    cout << n + 1 << "\n";
  }
  for (int i = cnt; i <= n; i++) {
    cout << c[i];
  }
  cout << "\n";
  return 0;
}
