#include <bits/stdc++.h>
using namespace std;
const long long int oo = 1000 * 1000 * 1000;
struct Coord {
  int x, y;
  Coord(int x = 0, int y = 0) : x(x), y(y) {}
  Coord operator+(const Coord& droite) const {
    return Coord(x + droite.x, y + droite.y);
  }
};
int main() {
  int n, t;
  scanf("%d%d", &n, &t);
  vector<int> orig;
  vector<int> decimals;
  int begin = 0;
  for (int i = 0; i < n; ++i) {
    char temp;
    scanf(" %c", &temp);
    if (temp == '.')
      begin = i;
    else {
      orig.push_back(temp - '0');
      decimals.push_back(temp - '0');
    }
  }
  int nbSwitch = 0;
  int end = decimals.size() - 1;
  for (int i = end; i >= begin; --i) {
    if (orig[i] > 4) {
      nbSwitch = 1;
      decimals[i - 1] = orig[i - 1] + 1;
      end = i - 1;
    } else if (decimals[i] == 10) {
      if (end == i) end -= 1;
      decimals[i] = 0;
      decimals[i - 1] += 1;
    } else if (decimals[i] > 4 && nbSwitch < t) {
      nbSwitch += 1;
      end = i - 1;
      decimals[i - 1] += 1;
    }
    if (i == end && decimals[i] == 0) --end;
  }
  for (int i = begin - 1; i > 0; --i)
    if (decimals[i] == 10) {
      decimals[i] = 0;
      ++decimals[i - 1];
    }
  bool zeros = true;
  for (int i = 0; i < begin; ++i) {
    if (decimals[i]) zeros = false;
    if (!zeros || i == begin - 1) printf("%d", decimals[i]);
  }
  if (end >= begin) printf(".");
  for (int i = begin; i <= end; ++i) printf("%d", decimals[i]);
  printf("\n");
  return 0;
}
