#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167772160000")
using namespace std;
vector<int> bef;
vector<int> aft;
void add2(int a) {
  bef[a]++;
  if (a > 0 && bef[a] == 10) {
    add2(a - 1);
    bef[a] = 0;
  }
}
void add1(int a) {
  if (a == -1) {
    add2(bef.size() - 1);
    return;
  }
  aft[a]++;
  if (aft[a] == 10) {
    aft[a] = 0;
    if (a == 0)
      add2(bef.size() - 1);
    else
      add1(a - 1);
  }
}
int main() {
  int n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  int i = 0;
  while (s[i] != '.') bef.push_back(s[i++] - '0');
  i++;
  while (i < s.length()) aft.push_back(s[i++] - '0');
  i = 0;
  while (i < aft.size() && aft[i] < 5) i++;
  int zeroes = aft.size();
  if (i < aft.size()) {
    while (i >= 0 && t > 0 && aft[i] > 4) {
      add1(i - 1);
      zeroes = i;
      i--;
      t--;
    }
  }
  while (aft.size() > zeroes) aft.pop_back();
  while (!aft.empty() && aft.back() == 0) aft.pop_back();
  for (int i = 0; i < bef.size(); i++) cout << bef[i];
  if (aft.size() > 0) {
    cout << ".";
    for (int i = 0; i < aft.size(); i++) cout << aft[i];
  }
  return 0;
}
