#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
char str[maxn], pre[maxn];
int main() {
  memset(str, 0, sizeof(str));
  int len, k;
  scanf("%d %d", &len, &k);
  scanf("%s", str + 1);
  int vis = -1;
  bool ok = false;
  int point;
  for (int i = 1; i <= len; i++) {
    if (str[i] == '.') {
      point = i;
      ok = true;
    }
    if (ok && i != len && str[i + 1] >= '5') {
      int pos = i + 1;
      while (str[i] == '9' || str[i] == '.') {
        if (str[i] != '.') str[i] = '0';
        i--;
        if (i == 0) {
          str[i] = '0';
          break;
        }
      }
      str[i] += 1;
      str[pos] = 0;
      if (str[i] >= '5') {
        vis = i;
      }
      break;
    }
  }
  k--;
  while (k && vis != -1 && vis > point) {
    int len = strlen(str);
    strcpy(pre, str);
    bool ok = false;
    int pos = vis;
    int i = vis - 1;
    while (str[i] == '9' || str[i] == '.') {
      if (str[i] != '.') str[i] = '0';
      i--;
      if (i == 0) {
        str[i] = '0';
        break;
      }
    }
    str[i] += 1;
    str[pos] = 0;
    if (str[i] >= '5') {
      vis = i;
    } else
      break;
    k--;
  }
  len = strlen(str + 1);
  for (int i = len; i >= 1; i--) {
    if (str[i] == '.') {
      str[i] = 0;
      break;
    }
    if (str[i] != '0') {
      str[i + 1] = 0;
      break;
    }
  }
  if (str[0] == '1')
    printf("%s\n", str);
  else
    printf("%s\n", str + 1);
}
