#include <bits/stdc++.h>
using namespace std;
int n, k;
char str[200005];
void add(int x) {
  if (str[x] == '.') x = x - 1;
  if (str[x] == '9') {
    str[x] = '0';
    add(x - 1);
  } else
    str[x]++;
}
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", str + 1);
  str[0] = '0';
  int l = 0, r = n;
  for (int i = 1; i <= n; ++i) {
    if (str[i] == '.') {
      l = i + 1;
      break;
    }
  }
  bool flg = 0;
  for (int i = l; i <= n; ++i)
    if (str[i] - '5' >= 0) {
      r = i;
      flg = 1;
      break;
    }
  for (int i = 1; i <= k && flg; ++i) {
    flg = 0;
    add(r - 1);
    for (int i = r - 1; i >= l - 1; --i) {
      if (str[i] != '0') {
        r = i;
        break;
      }
    }
    for (int j = r; j >= l; --j) {
      if (str[j] - '5' >= 0) {
        r = j;
        flg = 1;
        break;
      }
    }
  }
  if (str[0] != '0') printf("%c", str[0]);
  for (int i = 1; i <= l - 2; ++i) printf("%c", str[i]);
  if (r != l - 1) {
    for (int i = l - 1; i <= r; ++i) {
      printf("%c", str[i]);
    }
  }
  return 0;
}
