#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, i1, pos = -1, cf = 0, flag;
  char s[200001];
  scanf("%d %d", &n, &m);
  scanf("%s", s);
  flag = 0;
  for (i = 0; n > i; i++) {
    if (s[i] == '.') {
      flag = 1;
    } else {
      if (flag == 1 && s[i] >= '5' && s[i] <= '9') {
        break;
      }
    }
  }
  if (flag == 0) {
    puts(s);
    return 0;
  }
  for (i1 = 1; s[i] != '.' && m >= i1; i--, i1++) {
    if (s[i] + cf >= '5' && s[i] + cf <= '9' || (s[i] == '9' && cf == 1)) {
      cf = 1;
      pos = i;
    } else {
      if (cf == 1) {
        s[i]++;
      }
      cf = 0;
    }
  }
  flag = -1;
  while (i != -1 && cf != 0) {
    if (s[i] == '.') {
      flag = i;
      pos = i;
      i--;
      continue;
    }
    if (s[i] == '9' && cf == 1) {
      if (flag != -1) {
        s[i] = '0';
      } else {
        pos = i;
      }
      cf = 1;
    } else {
      s[i]++;
      break;
    }
    i--;
  }
  if (i == -1) {
    printf("1");
  }
  if (pos != -1) {
    s[pos] = '\0';
  }
  puts(s);
  return 0;
}
