#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int n, t, id, en;
string s, a, b;
int main() {
  cin >> n >> t >> s;
  id = s.find('.');
  a = s.substr(0, id);
  b = s.substr(id + 1);
  en = b.size();
  id = -1;
  for (int i = 0; i < b.size(); i++)
    if (b[i] >= '5') {
      id = i;
      break;
    }
  if (b.size() == 0) return cout << a << endl, 0;
  if (id == -1) return cout << s << endl, 0;
  while (t--) {
    if (!id) {
      int z = a.size() - 1;
      while (a[z] == '9' && z >= 0) a[z] = '0', z--;
      if (z == -1)
        a.insert(0, "1");
      else
        a[z]++;
      cout << a << endl;
      return 0;
    } else {
      b[id - 1]++;
      en = id;
      id--;
      if (b[id] < '5') break;
    }
  }
  cout << a << '.';
  for (int i = 0; i < en; i++) cout << b[i];
}
