#include <bits/stdc++.h>
using namespace std;
int l, r, n, T, L;
char a[2000010];
int find() {
  for (int i = L; i <= r; i++)
    if (a[i] >= '5' && a[i] != '.') return i;
  return 0;
}
void print() {
  int r = n;
  while (a[r] == '0') r--;
  for (int i = 1; i <= r; i++) putchar(a[i]);
}
int main() {
  scanf("%d%d", &n, &T);
  l = 1;
  r = n;
  scanf("%s", a + 1);
  for (int i = 1; i <= n; i++)
    if (a[i] == '.') L = i + 1;
  int t = 0;
  a[0] = '0';
  int pos = find();
  if (pos == 0) {
    print();
    return 0;
  }
  for (int i = pos; i >= L; i--) {
    if (t >= T) break;
    if (a[i] >= '5') {
      if (a[i - 1] == '.') i--;
      a[i - 1] += 1;
      int x = i - 1;
      while (a[x] > '9') {
        a[x] = a[x] - 10;
        if (a[x - 1] == '.') x--;
        a[x - 1] += 1;
        x--;
      }
      t++;
      pos = i;
    }
  }
  if (a[0] == '1') l = 0;
  for (int i = l; i < pos; i++) putchar(a[i]);
}
