#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  char o = '9' + 1;
  int i = 0;
  for (; s[i] != '.'; i++)
    ;
  int x = i;
  i++;
  while (i < s.length() && s[i] < '5') i++;
  int e = 0;
  e = i;
  if (e == s.length()) e--;
  bool b = false;
  while (t) {
    if (s[i] < '5') break;
    if (s[i - 1] == '.') {
      i--;
      t--;
      e = i - 1;
      s[i - 1]++;
      while (i != 1 && s[i - 1] == o) {
        s[i - 1] = '0';
        i--;
        s[i - 1]++;
      }
      if (s[0] == o) s[0] = '0', b = true;
      break;
    }
    t--;
    s[i - 1]++;
    e = i - 1;
    i--;
  }
  if (b) cout << '1';
  for (int i = 0; i <= e; i++) {
    cout << s[i];
  }
  cout << endl;
}
