#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200000 + 10;
void addOne(string dec) {
  int i = dec.length() - 1;
  for (; i >= 0; i--) {
    if (dec[i] != '9') {
      dec[i] += 1;
      break;
    }
    dec[i] = '0';
  }
  if (i < 0) {
    dec = "1" + dec;
  }
  printf("%s\n", dec.c_str());
}
int main() {
  int N, t;
  scanf("%d %d", &N, &t);
  char s[MAX_N];
  scanf("%s", s);
  string whole = "";
  int i = 0;
  while (s[i] != '.') {
    whole += s[i++];
  }
  i++;
  string dec = "";
  while (i < N) {
    dec += s[i++];
  }
  int a[dec.length()];
  int firstGood = -1;
  for (int i = 0; i < dec.length(); i++) {
    a[i] = dec[i] - '0';
    if (firstGood == -1 && a[i] >= 5) {
      firstGood = i;
    }
  }
  if (firstGood == -1) {
    printf("%s\n", s);
    return 0;
  }
  if (firstGood == 0) {
    addOne(whole);
    return 0;
  }
  int traveler = firstGood;
  while (traveler >= 0 && t > 0 && a[traveler] >= 5) {
    if (a[traveler] == 10) {
      if (traveler - 1 >= 0) {
        a[traveler - 1] += 1;
      }
    } else {
      if (traveler - 1 >= 0) {
        a[traveler - 1] += 1;
      }
      t--;
    }
    traveler--;
  }
  if (traveler < 0) {
    addOne(whole);
    return 0;
  }
  string res = whole;
  res += '.';
  for (int i = 0; i <= traveler; i++) {
    res += (char)(a[i] + '0');
  }
  printf("%s\n", res.c_str());
  return 0;
}
