#include <bits/stdc++.h>
using namespace std;
int flag[222222];
int s[222222];
char ss[222222];
int ls, k;
int main() {
  int i, j, st;
  cin >> ls >> k;
  cin >> ss;
  for (i = 0; i < ls; i++)
    if (ss[i] == '.')
      s[i] = -1;
    else
      s[i] = ss[i] - '0';
  st = -1;
  int fdot = 0, pdot;
  for (i = 0; i < ls; i++) {
    if (fdot && s[i] <= 9 && s[i] >= 5) {
      st = i;
      break;
    } else if (s[i] == -1) {
      pdot = i;
      fdot = 1;
    }
  }
  if (st == -1) {
    cout << ss << endl;
    return 0;
  }
  memset(flag, 0, sizeof(flag));
  while (k && st != pdot + 1) {
    k--;
    flag[st] = 1;
    s[st] = '0';
    st--;
    s[st]++;
    if (s[st] < 5) break;
  }
  int sst = st;
  if (k && sst == pdot + 1 && s[sst] >= 5) {
    k--;
    flag[sst] = 1;
    sst -= 2;
    s[sst]++;
    while (sst > 0 && s[sst] >= 10) {
      s[sst] -= 10;
      sst--;
      s[sst]++;
    }
  }
  while (s[st] == '0') {
    flag[st] = 1;
    st--;
  }
  if (flag[pdot + 1] == 1) flag[pdot] = 1;
  if (s[0] >= 10) printf("1");
  for (i = 0; i < ls; i++)
    if (flag[i] == 0) {
      if (s[i] == -1)
        printf(".");
      else
        printf("%d", s[i] % 10);
    } else
      break;
  printf("\n");
  return 0;
}
