#include <bits/stdc++.h>
using namespace std;
int n, t;
char str[222222];
int main() {
  scanf("%d%d%s", &n, &t, str);
  int i, j, s, p, q;
  bool dot = false;
  for (i = 0; i < n; i++) {
    if (str[i] == '.') dot = true;
    if (str[i] != '.' && dot && str[i] >= '5') break;
  }
  if (i < n) {
    for (j = i - 1; j >= 0; j--) {
      if (str[j] == '.') continue;
      if (str[j] < '4' || str[j + 1] == '.') break;
      if (str[j] >= '0' && str[j] <= '9') {
        t--;
        if (t == 0) break;
      }
    }
    if (j >= 0) str[j] = str[j] + 1;
  } else
    j = n - 1;
  while (str[j] > '9' && j > 0) {
    if (str[j - 1] == '.') j--;
    str[j - 1]++;
    str[j] -= 10;
    j--;
  }
  dot = false;
  for (i = 0; i <= j; i++) {
    if (str[i] == '.') {
      dot = true;
      printf(".");
    } else
      printf("%d", str[i] - '0');
  }
  if (!dot) {
    for (;; i++) {
      if (str[i] == '.') break;
      printf("%d", str[i] - '0');
    }
  }
  printf("\n");
  return 0;
}
