#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
inline void judge() {
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
}
const int maxn = 200005;
char s1[maxn], s2[maxn], s[maxn];
int n, t;
inline void add(char *s, int n) {
  s[n]++;
  if (s[n] > '9') {
    for (int i = (n); i >= (1); i--) {
      if (s[i] > '9') {
        s[i] -= 10;
        s[i - 1]++;
      } else
        break;
    }
  }
}
int main() {
  read(n);
  read(t);
  scanf("%s", s + 1);
  int pt = 0;
  for (int i = (1); i <= (n); i++) {
    if (s[i] == '.') pt = i;
  }
  for (int i = (1); i <= (pt - 1); i++) s1[i] = s[i];
  int tot = 0;
  for (int i = (pt + 1); i <= (n); i++) s2[++tot] = s[i];
  int fi = tot;
  for (int i = (1); i <= (tot); i++) {
    if (s2[i] >= '5') {
      add(s2, i - 1);
      t--;
      int j = i - 1;
      fi = min(fi, i - 1);
      while (t && j) {
        if (s2[j] >= '5') {
          add(s2, j - 1);
          t--;
          j--;
          fi = min(fi, j);
        } else
          break;
      }
      break;
    }
  }
  if (s2[0]) add(s1, pt - 1);
  if (s1[0]) putchar('1');
  printf("%s", s1 + 1);
  if (fi) putchar('.');
  for (int i = (fi + 1); i <= (tot); i++) s2[i] = 0;
  printf("%s", s2 + 1);
  return 0;
}
