#include <bits/stdc++.h>
using namespace std;
int n, t;
int ans;
char str[200005];
int main() {
  cin >> n >> t;
  cin >> str;
  int len = strlen(str);
  int dot_pos = 0, pos = 0;
  int flag = 0;
  int last = len;
  for (int i = 0; i < len; i++) {
    if (str[i] == '.') {
      dot_pos = i;
      flag = 1;
    }
    if (flag == 1 && str[i] - '5' >= 0) {
      pos = i;
      break;
    }
  }
  if (pos <= dot_pos) {
    for (int i = 0; i < len; i++) cout << str[i];
    cout << endl;
    return 0;
  }
  int m = len - dot_pos;
  int k = 0;
  while (k < min(m - 1, t) && pos > dot_pos && str[pos] >= '5') {
    if (pos - 1 == dot_pos) pos--;
    while (str[pos - 1] == '9') {
      pos--;
      if (pos - 1 == dot_pos) pos--;
      last = pos;
    }
    str[pos - 1] += 1;
    pos--;
    last = pos;
    k++;
  }
  for (int i = 0; i <= last; i++) cout << str[i];
  if (last == -1 && str[0] == '9') cout << "1";
  while (last + 1 < dot_pos) {
    cout << "0";
    last++;
  }
  cout << endl;
  return 0;
}
