#include <bits/stdc++.h>
using namespace std;
char b[1500000];
int a[1500000];
int main() {
  int n, t;
  while (~scanf("%d%d", &n, &t)) {
    int pos = n - 1;
    int flag = 0;
    scanf("%s", b);
    for (int i = 0; i < n; i++) {
      if (b[i] >= '5' && flag == 1) {
        pos = i;
        break;
      }
      if (b[i] == '.') flag = 1;
    }
    for (int i = 0; i < n; i++) {
      if (b[i] == '.')
        a[i] = -1;
      else
        a[i] = b[i] - '0';
    }
    while (t > 0) {
      if (a[pos] >= 5) {
        pos--;
        if (a[pos] != -1) {
          a[pos]++;
        } else {
          pos--;
          a[pos]++;
          break;
        }
      } else
        break;
      t--;
    }
    for (int i = pos; i > 0; i--) {
      if (a[i] == 10) {
        a[i] = 0;
        a[i - 1]++;
      }
    }
    for (int i = 0; i <= pos; i++) {
      if (a[i] == -1)
        printf(".");
      else
        printf("%d", a[i]);
    }
    printf("\n");
  }
}
