#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  string a;
  cin >> n >> k >> a;
  int flag = 0;
  for (int i = k; i < n; i++) {
    if (a[i] > a[i - k])
      flag = 1;
    else if (a[i] < a[i - k])
      break;
  }
  if (flag == 1) {
    int pos = k - 1;
    while (a[pos] == '9') {
      a[pos--] = '0';
    }
    a[pos]++;
    if (pos == -1) a[k - 1] = '1';
  }
  for (int i = k; i < n; i++) a[i] = a[i - k];
  int pos = 0;
  while (a[pos] == '0') pos++;
  cout << n - pos << "\n";
  while (pos < n) {
    cout << a[pos];
    pos++;
  }
  return 0;
}
