#include <bits/stdc++.h>
using namespace std;
const int BUFFER = 2e5;
char str[BUFFER + 5];
int n, T;
int main() {
  scanf("%d%d", &n, &T);
  scanf("%s", str);
  bool carry = false;
  int c, c2;
  for (c = 0; str[c] != '.'; c++)
    ;
  int point = c;
  for (c++; c < n && str[c] < '5'; c++)
    ;
  int limit = n;
  for (; c > point; c--) {
    if (carry) {
      carry = false;
      str[c]++;
    }
    if (T > 0 && str[c] >= '5') {
      carry = true;
      limit = c;
      str[limit] = 0;
      T--;
    }
  }
  for (c--; carry && c >= 0; c--) {
    str[c]++;
    carry = false;
    if (str[c] > '9') {
      str[c] = '0';
      carry = true;
    }
  }
  if (carry) printf("1");
  str[point] = 0;
  printf("%s", str);
  str[point] = '.';
  if (limit > point + 1) {
    printf("%s", str + point);
  }
  printf("\n");
}
