#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long double pi = 3.141592653589793238462;
const long double eps = 1e-6;
const long long mod = 1e9 + 7;
bool b(string a, string b) {
  for (long long i = 0; i < a.size(); ++i)
    if (a[i] < b[i])
      return 0;
    else if (a[i] > b[i])
      return 1;
  return 1;
}
int32_t main() {
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  string res = s;
  for (long long i = k; i < n; ++i) res[i] = res[i - k];
  if (b(res, s)) {
    cout << n << endl;
    cout << res;
    return 0;
  }
  bool f = 0;
  for (long long i = 0; i < k; ++i)
    if (s[i] != '9') f = 1;
  if (f) {
    for (long long i = k - 1;; --i)
      if (s[i] == '9')
        s[i] = '0';
      else {
        s[i]++;
        break;
      }
    res = s;
    for (long long i = k; i < n; ++i) res[i] = res[i - k];
    cout << n << endl;
    cout << res;
    return 0;
  }
  s = '1' + s;
  for (long long i = 1; i < k; ++i) s[i] = '0';
  n++;
  res = s;
  for (long long i = k; i < n; ++i) res[i] = res[i - k];
  ;
  cout << n << endl;
  cout << res;
}
