#include <bits/stdc++.h>
using namespace std;
char str[200005];
int main() {
  std::ios::sync_with_stdio(0);
  int l, t;
  str[0] = '0';
  cin >> l >> t >> (str + 1);
  int len = strlen(str) - 1, tail = len, point;
  for (int i = 0; i <= len; i++) {
    if (str[i] == '.') {
      point = i;
    }
  }
  int loc = -1;
  for (int i = len; i > point; i--) {
    if (str[i] >= '5') {
      loc = i;
    }
  }
  if (loc > 0) {
    tail = loc;
    while (t--) {
      len = tail;
      loc = len;
      if (point > tail) break;
      for (int i = len; i > point; i--) {
        if (str[i] >= '5') {
          loc = i;
          break;
        }
      }
      int jin = 0;
      if (str[loc] >= '5') {
        jin = 1;
      }
      if (loc == len && jin == 0) {
        break;
      }
      tail = loc - 1;
      if (jin > 0 && str[tail] + jin <= '9' && str[tail] != '.') {
        str[tail] += jin;
        jin = 0;
      }
      while (jin > 0) {
        if (str[tail] == '.') {
          tail--;
        }
        str[tail] += jin;
        if (str[tail] <= '9')
          jin = 0;
        else {
          str[tail] -= 10;
          tail--;
        }
      }
    }
  }
  if (str[0] == '0') {
    if (tail < point) {
      tail = point;
    }
    for (int i = 1; i <= tail; i++) {
      if (i == tail && str[tail] == '.') {
        continue;
      }
      cout << str[i];
    }
    cout << endl;
  } else {
    if (tail < point) {
      tail = point;
    }
    for (int i = 0; i <= tail; i++) {
      if (i == tail && str[tail] == '.') {
        continue;
      }
      cout << str[i];
    }
    cout << endl;
  }
  return 0;
}
