#include <bits/stdc++.h>
using namespace std;
int n, t, ed;
string s, ans;
int main() {
  cin >> n >> t;
  cin >> s;
  ed = 0;
  ans = "";
  ans = s;
  s.insert(s.begin(), '0');
  int temp = min(n, t), pos;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] != '.')
      ed++;
    else
      break;
  }
  ed++;
  for (int i = ed; i < s.length(); i++) {
    if (s[i] >= '5') {
      ed = i;
      break;
    } else {
      ed++;
    }
  }
  if (ed == s.length()) {
    cout << ans;
    return 0;
  }
  int carry = 1;
  while (s[ed] != '.' && temp > 0) {
    if (s[ed] >= '5') {
      if (s[ed - 1] != '.') {
        s[ed - 1]++;
        temp--;
      } else {
        ed--;
        break;
      }
      ed--;
    } else {
      break;
    }
  }
  if (s[ed] != '.') {
    if (s[0] != '0')
      for (int i = 0; i <= ed; i++) cout << s[i];
    else
      for (int i = 1; i <= ed; i++) cout << s[i];
  } else {
    ed--;
    pos = ed;
    while (carry != 0) {
      if (s[ed] == '9') {
        s[ed] = '0';
        carry = 1;
        ed--;
      } else {
        s[ed] += 1;
        carry = 0;
      }
    }
    if (s[0] != '0')
      for (int i = 0; i <= pos; i++) cout << s[i];
    else
      for (int i = 1; i <= pos; i++) cout << s[i];
  }
}
