#include <bits/stdc++.h>
using namespace std;
int n, t, i, dot, digit, carry, pos = -1;
string s;
int main() {
  cin >> n >> t >> s;
  while (s[i] != '.') i++;
  dot = i++;
  while (i < n) {
    digit = s[i] - '0';
    if (digit >= 5) {
      pos = i;
      break;
    }
    i++;
  }
  if (i == n) return cout << s, 0;
  while (i > dot) {
    if (carry) {
      digit = s[i] - '0';
      digit++;
      if (digit <= 9) carry = 0;
      digit %= 10;
      s[i] = digit + '0';
    }
    digit = s[i] - '0';
    if (digit >= 5 && t) {
      carry = 1;
      s[i] = '0';
      --t;
    }
    i--;
  }
  i--;
  while (i >= 0 && carry) {
    digit = s[i] - '0';
    digit++;
    if (digit <= 9) carry = 0;
    digit %= 10;
    s[i] = digit + '0';
    i--;
  }
  if (carry) cout << 1;
  i = pos;
  while (i > 0) {
    if (s[i] == '0')
      i--;
    else if (s[i] == '.') {
      i--;
      break;
    } else
      break;
  }
  i = max(i, dot - 1);
  for (int j = 0; j <= i; j++) cout << s[j];
}
