#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
int n;
int m;
int dot;
char s[maxn];
int t;
void _shift() {
  for (int i = n - 1; i >= 0; i--) s[i + 1] = s[i];
  s[0] = '1';
  dot++;
  n++;
}
void up(int x) {
  if (x > dot + 1) {
    s[x - 1]++;
    n = x;
  } else {
    n = dot;
    int i = n - 1;
    while (s[i] == '9' && i >= 0) {
      s[i] = '0';
      i--;
    }
    if (i >= 0)
      s[i]++;
    else {
      s[i + 1] = '0';
      _shift();
    }
  }
}
int main() {
  scanf("%d %d", &n, &t);
  scanf("%s", s);
  int tr = n;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') {
      dot = i;
      break;
    }
  }
  int jump = dot + 1;
  while (t > 0) {
    int k = 1;
    if (jump <= dot) jump = dot + 1;
    for (int i = jump; i < n; i++) {
      if (s[i] >= '5') {
        jump = i - 2;
        up(i);
        k = 0;
        break;
      }
    }
    if (k) break;
    t--;
  }
  s[n] = '\0';
  printf("%s\n", s);
  return 0;
}
