#include <bits/stdc++.h>
using namespace std;
int N, T;
char buff[2 * 100013];
char* buf = buff + 5;
int main() {
  scanf("%d%d", &N, &T);
  scanf(" %s", buf);
  if (T == 0) {
    printf("%s\n", buf);
  }
  int loc = N;
  for (int i = int(0), __border_righti = int(N); i < __border_righti; i++) {
    if (buf[i] == '.') {
      loc = i;
      break;
    }
  }
  if (loc == 0) {
    buf--;
    buf[0] = '0';
    N++;
    loc++;
  }
  int r = loc + 1;
  while (r < N && buf[r] < '5') {
    r++;
  }
  if (r != N) {
    for (int i = int(r), __border_righti = int(N); i < __border_righti; i++) {
      if (buf[i] != '.') {
        buf[i] = '0';
      }
    }
    int t = r - 1;
    T--;
    while (T && t) {
      if (buf[t] != '4') {
        break;
      }
      buf[t] = '0';
      t--;
      T--;
    }
    if (t == loc) {
      t--;
      while (t && buf[t] == '9') {
        buf[t] = '0';
        t--;
      }
    }
    if (t == 0 && buf[t] == '9') {
      buf[t] = '0';
      buf--;
      buf[0] = '1';
      loc++;
      N++;
    } else {
      buf[t]++;
    }
  }
  while (N > loc && buf[N - 1] == '0') {
    buf[--N] = 0;
  }
  if (N == loc + 1) {
    buf[--N] = 0;
  }
  printf("%s\n", buf);
  return 0;
}
