#include <bits/stdc++.h>
int n, m, dot, spot;
char s[200020];
bool f, cout;
int main() {
  scanf("%d %d", &n, &m);
  scanf("%s", s);
  int l = strlen(s);
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') {
      dot = i;
      break;
    }
  }
  for (int i = dot + 1; i < l; i++)
    if (s[i] >= '5') {
      spot = i;
      break;
    }
  for (int i = spot; i > dot; i--) {
    if (m == 0) break;
    m--;
    f = 0;
    if (s[i] >= '5') {
      spot--;
      f = 1;
      if (s[i - 1] != '.') {
        s[i - 1]++;
        s[i] = '\0';
      } else {
        s[i - 1] = '\0';
        s[i - 2]++;
        while (1) {
          if (s[i - 2] > '9') {
            s[i - 2] = '0';
            if (i - 2 != 0)
              s[i - 3]++;
            else {
              cout = 1;
            }
            i--;
          } else
            break;
        }
      }
    } else
      break;
  }
  if (cout) printf("1");
  printf("%s", s);
  return 0;
}
