#include <bits/stdc++.h>
char str[200100];
int dy[200100];
int main() {
  int n, t;
  scanf("%d%d%s", &n, &t, str);
  int idx = -1;
  for (int i = 0; str[i] != '\0'; i++) {
    if (str[i] == '.') {
      idx = i;
    } else {
      str[i] -= '0';
    }
  }
  for (int i = n - 1; i > idx; i--) {
    if (str[i] >= 5) {
      dy[i] = 1;
    } else if (str[i] < 4) {
      dy[i] = -1;
    } else {
      if (i != n - 1 && dy[i + 1] != -1) {
        dy[i] = dy[i + 1] + 1;
      } else {
        dy[i] = -1;
      }
    }
  }
  int ans = n;
  for (int i = idx + 1; i < n; i++) {
    if (dy[i] <= t && dy[i] != -1) {
      ans = i;
      break;
    }
  }
  if (ans == idx + 1) {
    str[idx - 1]++;
    for (int i = idx - 1; i > 0; i--) {
      if (str[i] == 10) {
        str[i] = 0;
        str[i - 1]++;
      }
    }
    for (int i = 0; i < idx; i++) {
      printf("%d", str[i]);
    }
    return 0;
  } else {
    if (ans != n) str[ans - 1]++;
    for (int i = ans - 1; i > idx + 1; i--) {
      if (str[i] == 10) {
        str[i] = 0;
        str[i - 1]++;
      }
    }
    if (str[idx + 1] == 10) {
      str[idx + 1] = 0;
      str[idx - 1]++;
      for (int i = idx - 1; i > 0; i--) {
        if (str[i] == 10) {
          str[i] = 0;
          str[i - 1]++;
        }
      }
    }
    for (int i = 0; i < idx; i++) {
      printf("%d", str[i]);
    }
    printf(".");
    for (int i = idx + 1; i < ans; i++) {
      printf("%d", str[i]);
    }
  }
}
