#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  char str[200010];
  scanf("%d%d", &n, &t);
  scanf("%s", str + 1);
  str[0] = '0';
  int dec = 0;
  for (int i = 0; i <= n; i++) {
    if (str[i] == '.') {
      dec = ++i;
      break;
    }
  }
  int first_up = 0;
  for (int i = dec; i <= n; i++) {
    if (str[i] >= '5') {
      first_up = i;
      break;
    }
  }
  for (int i = first_up; str[i] != '.' && t; i--) {
    if (str[i] < '5') continue;
    t--;
    str[i] = 0;
    int cur = i - 1;
    bool down = true;
    if (str[cur] == '.') {
      str[cur] = 0;
      cur--;
      down = false;
    }
    while (str[cur] == '9') {
      if (down)
        str[cur] = 0;
      else
        str[cur] = '0';
      cur--;
      if (str[cur] == '.') {
        str[cur] = 0;
        cur--;
        down = false;
      }
    }
    str[cur]++;
    if (!down) break;
    fflush(stdout);
  }
  if (str[0] == '0') {
    printf("%s\n", str + 1);
  } else {
    printf("%s\n", str);
  }
  return 0;
}
