#include <bits/stdc++.h>
using namespace std;
int main() {
  string rj = "";
  int n, t;
  scanf("%d %d", &n, &t);
  char s[n];
  scanf("%s", s);
  int tocka;
  for (int i = 0; i < n; i++)
    if (s[i] == '.') tocka = i;
  int pet = n - 2, global_jedan = 0;
  int sss = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '0' && !sss) {
      if (tocka != i - 1)
        pet = i - 1;
      else
        pet = i - 2;
    } else
      sss++;
  }
  for (int i = tocka + 1; i < n; i++) {
    if (s[i] >= '5') {
      pet = i;
      break;
    }
  }
  while (pet >= 0 && s[pet] >= '5' && pet > tocka && t--) {
    s[pet] = 0;
    pet--;
    while (pet >= 0 && (s[pet] == '9' || pet == tocka)) {
      if (pet != tocka) s[pet] = '0';
      pet--;
    }
    if (pet == -1)
      global_jedan = 1;
    else
      s[pet]++;
  }
  if (global_jedan) rj += "1";
  int nz = 0;
  for (int i = 0; i <= max(tocka - 1, pet + 1 - (pet + 1 == tocka)); i++) {
    if (s[i] != '0') nz = 1;
    if (s[i] == '0' && !nz && i + 1 != tocka && !global_jedan) continue;
    if (s[i] != '\0') rj += s[i];
  }
  cout << rj << endl;
  flush(cout);
  return 0;
}
