#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, l = 0, l2 = 0;
  string s;
  cin >> n >> t;
  cin >> s;
  l = 0;
  while (s[l] != '.') l++;
  l++;
  l2 = l;
  while (l2 < n && s[l2] < '5') l2++;
  if (l2 == n) {
    cout << s << "\n";
    return 0;
  } else {
    while (t && s[l2] != '.' && s[l2] >= '5') {
      if (s[l2 - 1] != '.')
        s[l2 - 1]++;
      else {
        l = l2;
        while (l - 2 >= 0 && s[l - 2] == '9') {
          s[l - 2] = '0';
          l--;
        }
        if (l - 2 >= 0)
          s[l - 2]++;
        else
          cout << "1";
      }
      l2--;
      t--;
    }
    if (s[l2] == '.')
      cout << s.substr(0, l2) << "\n";
    else
      cout << s.substr(0, l2 + 1) << "\n";
  }
  return 0;
}
