#include <bits/stdc++.h>
using namespace std;
long long int a[200005] = {0}, len, dpos, incpos;
char res[200005];
char ans[200005];
char second[200005];
char temp[200005];
void add(char *a, char *b) {
  int i, x, y, z, carry = 0;
  for (i = len - 1; i >= 0; i--) {
    if (i == dpos) {
      res[i] = '.';
      continue;
    }
    x = a[i] - '0';
    y = b[i] - '0';
    z = (x + y + carry) % 10;
    carry = (x + y + carry) / 10;
    char ch = z + '0';
    res[i] = ch;
  }
  if (carry != 0) {
    char ch = carry + '0';
    ans[0] = ch;
    for (i = 0; i < len; i++) ans[i + 1] = res[i];
    ans[i + 1] = '\0';
    incpos++;
  } else {
    for (i = 0; i < len; i++) ans[i] = res[i];
    ans[i] = '\0';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int i, t, nlen;
  char ch;
  cin >> len >> t;
  cin >> second;
  for (i = 0; i < len; i++)
    if (second[i] == '.') break;
  dpos = i;
  if ((second[len - 1] - '0') >= 5)
    a[len - 1] = 1;
  else
    a[len - 1] = 10000000000;
  for (i = len - 2; i > dpos; i--) {
    if ((second[i] - '0') >= 5)
      a[i] = 1;
    else if (second[i] == '4')
      a[i] = a[i + 1] + 1;
    else
      a[i] = 10000000000;
  }
  for (i = dpos + 1; i < len; i++)
    if (a[i] <= t) break;
  incpos = i;
  if (incpos == len)
    cout << second << "\n";
  else {
    incpos--;
    if (incpos == dpos) incpos--;
    for (i = 0; i < dpos; i++) temp[i] = '0';
    temp[i] = '.';
    for (i = dpos + 1; i < len; i++) temp[i] = '0';
    temp[incpos] = '1';
    add(second, temp);
    for (i = len - 1; i > dpos; i--) {
      if (second[i] != '0') break;
    }
    nlen = i;
    if (nlen == dpos) nlen = nlen - 1;
    nlen = min(nlen, incpos);
    for (i = 0; i <= nlen; i++) cout << ans[i];
    cout << "\n";
  }
  return 0;
}
