#include <bits/stdc++.h>
using namespace std;
const int N = 410000;
char ch[N];
int a[N];
int n, t;
int main() {
  scanf("%d%d", &n, &t);
  scanf("%s", ch + 1);
  if (t == 0) {
    printf("%s", ch + 1);
    return 0;
  }
  int s = 0;
  for (int i = 1; i <= n; i++) {
    if (ch[i] == '.')
      s = i + 1;
    else if (s == 0)
      a[i + 1] = ch[i] - '0';
    else
      a[i] = ch[i] - '0';
  }
  int ok = 0;
  for (int i = s; i <= n; i++)
    if (a[i] >= 5) {
      n = i - 1;
      ok = 1;
      t--;
      a[i - 1]++;
      break;
    }
  if (ok == 0) {
    printf("%s", ch + 1);
    return 0;
  }
  while (t && n >= s && a[n] >= 5) {
    a[n - 1]++;
    a[n] %= 10;
    if (a[n]) t--;
    n--;
  }
  while (n >= s && a[n] == 0) n--;
  for (int i = n - 1; i >= 1; i--) a[i] += a[i + 1] / 10, a[i + 1] %= 10;
  if (a[1]) printf("%d", a[1]);
  for (int i = 2; i <= n; i++) {
    if (i == s) printf(".");
    printf("%d", a[i]);
  }
}
