#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
char s[MAXN];
int main() {
  int n, t;
  scanf(" %d %d", &(n), &(t));
  scanf(" %s", s);
  int pos = -1;
  int dot = -1;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '.')
      dot = i;
    else if (dot != -1 && s[i] >= '5') {
      pos = i;
      break;
    }
  }
  if (pos == -1) {
    printf("%s\n", s);
    exit(0);
  }
  bool plus = false;
  while (t > 0 && s[pos] != '.' && s[pos] >= '5') {
    --pos;
    while (s[pos] == '9') {
      s[pos--] = '0';
    }
    if (s[pos] == '.') {
      plus = true;
      break;
    }
    --t;
    ++s[pos];
  }
  if (plus) {
    pos = dot - 1;
    while (pos >= 0 && s[pos] == '9') {
      s[pos--] = '0';
    }
    if (pos < 0) {
      printf("1");
    } else
      ++s[pos];
    for (int i = 0; i < (dot); ++i) printf("%c", s[i]);
    printf("\n");
  } else {
    for (int i = 0; i < (pos + 1); ++i) printf("%c", s[i]);
    printf("\n");
  }
  return 0;
}
