#include <bits/stdc++.h>
using namespace std;
char ch[200050];
int carry = 0;
void add(int pos) {
  for (int i = pos; i >= 0; i--) {
    if (ch[i] != '.') {
      ch[i] = ch[i] + 1;
      if (ch[i] > '9') {
        ch[i] = '0';
      } else
        return;
    }
  }
  carry = 1;
}
int main() {
  int n, t;
  cin >> n >> t;
  cin >> ch;
  int dot = -1, pos = -1, len = n - 1, flag = 0;
  for (int i = 0; i < n; i++) {
    if (ch[i] == '.') dot = i, flag = 1;
    if (flag && ch[i] > '4') pos = i, flag = 0;
  }
  if (pos == -1) pos = n - 1;
  while (t > 0 && pos > dot) {
    if (ch[pos] > '4') {
      add(pos - 1);
      len = pos - 1;
      t--;
    }
    pos--;
  }
  while (ch[len] == '0') {
    len--;
  }
  if (len == dot) len--;
  if (carry) cout << carry;
  for (int i = 0; i <= len; i++) cout << ch[i];
  cout << endl;
}
