#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int n, t, a[maxn], b[maxn], c[maxn], d[maxn], pos, fuck;
char st[maxn];
void change(int x) {
  a[x]++;
  if (a[x] == 10) a[x] = 0, change(x - 1);
}
int main() {
  scanf("%d%d", &n, &t);
  scanf("%s", st + 1);
  int tot = n;
  for (int i = 1; i <= n; i++) {
    if (st[i] == '.')
      a[i] = -1, b[i] = a[i], fuck = i;
    else {
      a[i] = st[i] - '0';
      b[i] = a[i];
    }
  }
  for (int i = 1; i <= tot; i++) {
    if (i <= fuck) {
      b[i] = 3;
      continue;
    }
    if (b[i] == 4)
      b[i] = 2;
    else if (b[i] >= 5)
      b[i] = 1;
    else
      b[i] = 3;
  }
  memset(d, -1, sizeof(d));
  b[tot + 1] = 3;
  for (int i = tot; i >= 1; i--) {
    if (b[i] == 3) continue;
    if (b[i] == 2) {
      if (b[i + 1] == 2) {
        if (d[i + 1] != -1) d[i] = d[i + 1] + 1;
      } else if (b[i + 1] == 1) {
        d[i] = d[i + 1] + 1;
      }
    } else {
      d[i] = 1;
    }
  }
  pos = n + 1;
  for (int i = 1; i <= tot; i++) {
    if (d[i] != -1) {
      if (d[i] <= t) {
        pos = i;
        break;
      }
    }
  }
  if (pos == n + 1) {
    for (int i = 1; i <= n; i++) {
      if (a[i] != -1)
        printf("%d", a[i]);
      else
        printf(".");
    }
    puts("");
    return 0;
  } else {
    if (pos == fuck + 1) {
      change(fuck - 1);
      if (a[0]) printf("%d", a[0]);
      for (int i = 1; i < fuck; i++) printf("%d", a[i]);
      puts("");
      return 0;
    }
    if (pos == 1) {
      printf("1");
      for (int i = 1; i <= n; i++) {
        if (a[i] == -1) break;
        printf("%d", 0);
      }
      puts("");
    } else {
      bool bo = 0;
      for (int i = 1; i <= pos - 2; i++) {
        if (a[i] != -1)
          printf("%d", a[i]);
        else
          printf("."), bo = 1;
      }
      printf("%d", a[pos - 1] + 1);
      if (!bo)
        for (int i = pos; i <= n; i++) {
          if (a[i] == -1)
            break;
          else
            printf("0");
        }
      puts("");
    }
  }
  return 0;
}
