#include <bits/stdc++.h>
using namespace std;
string s, num;
int main() {
  long long t, l, i, dot, pos, cnt, n, d, carry;
  cin >> n >> t;
  cin >> s;
  l = n;
  dot = -1;
  pos = -1;
  num = "";
  for (i = 0; i < l; i++) {
    if (s[i] == '.') {
      dot = i;
      continue;
    }
    if (dot == -1) {
      num += s[i];
      continue;
    }
    if (dot != -1 && (s[i] >= '5' && s[i] <= '9')) {
      pos = i;
      break;
    }
  }
  if (dot == -1 || pos == -1) {
    cout << s << endl;
    return 0;
  }
  s.erase(pos + 1, l - 1);
  cnt = 0;
  for (i = pos - 1; i > dot; i--) {
    d = (s[i] - '0') + 1;
    cnt++;
    s.erase(i);
    s += (d + 48);
    if (d < 5) break;
    if (cnt == t) break;
  }
  if (s[i + 1] < '5') {
    cout << s << endl;
    return 0;
  }
  carry = 1;
  l = num.length();
  for (i = l - 1; i >= 0; i--) {
    d = (num[i] - '0') + carry;
    if (d < 10) {
      num[i] = (d + 48);
      carry = 0;
      break;
    }
    num[i] = (d % 10) + 48;
    carry = d / 10;
  }
  if (carry > 0)
    cout << carry << num << endl;
  else
    cout << num << endl;
}
