#include <bits/stdc++.h>
using namespace std;
int n, m;
string a;
int main() {
  scanf("%d%d", &n, &m);
  cin >> a;
  int pp = a.find('.');
  a.erase(pp, 1);
  for (int i = pp - 1; i < n - 1; ++i)
    if (a[i + 1] >= '4') {
      for (int j = i + 1; j < n - 1; ++j)
        if (a[j] >= '5') {
          int k = max(j - m, i);
          ++a[k];
          while (a[k] > '9' && k >= 1) {
            a[k] = '0';
            ++a[k - 1];
            --k;
          }
          if (a[0] > '9') {
            a[k] = '0';
            putchar('1');
          }
          for (int l = 0; l < pp; ++l) putchar(a[l]);
          if (k > pp - 1) putchar('.');
          for (int l = pp; l <= k; ++l) putchar(a[l]);
          puts("");
          return 0;
        } else if (a[j] <= '3') {
          i = j;
          break;
        }
    }
  for (int i = 0; i < pp; ++i) putchar(a[i]);
  putchar('.');
  for (int i = pp; i < n - 1; ++i) putchar(a[i]);
  puts("");
  return 0;
}
