#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
string go(char x, string s) {}
int main() {
  int n;
  string s;
  int k;
  cin >> n >> k >> s;
  string t = s.substr(0, k);
  string ans;
  while (n > ans.size()) {
    ans += t;
  }
  while (ans.size() > n) ans.pop_back();
  if (ans >= s)
    cout << ans.size() << "\n" << ans;
  else {
    int ind = k - 1;
    for (; ind >= 0; ind--)
      if (t[ind] != '9') break;
    t[ind]++;
    ind++;
    for (; ind < k; ind++) t[ind] = '0';
    ans.clear();
    while (n > ans.size()) {
      ans += t;
    }
    while (ans.size() > n) ans.pop_back();
    cout << ans.size() << "\n" << ans;
  }
}
