#include <bits/stdc++.h>
const int pi = acos(-1);
using namespace std;
const int M = 100003;
char a[2 * M];
int main() {
  bool carry = 0, c = 0;
  int n, t, end = -1;
  cin >> n >> t;
  scanf("%s", a);
  string s = a;
  int i = s.find('.') + 1;
  for (; i < s.size(); i++)
    if (s[i] > '4') {
      carry = 1;
      break;
    }
  if (!carry) {
    cout << s;
    return 0;
  }
  for (int j = i - 1; j >= 0 && carry; j--) {
    if (s[j] == '.') {
      c = 1;
      break;
    }
    if (s[j] < '4') {
      s[j]++;
      end = j;
      break;
    }
    s[j]++;
    t--;
    if (!t) {
      end = j;
      break;
    }
  }
  if (c) {
    int j = s.find('.') - 1;
    int lel = j;
    for (; j >= 0; j--) {
      if (s[j] != '9') {
        s[j]++;
        c = 0;
        break;
      } else
        s[j] = '0';
    }
    if (c) {
      s = "1";
      for (int i = 0; i <= lel; i++) s += '0';
    }
    for (int i = 0; i < s.size(); i++)
      if (s[i] != '.')
        printf("%c", s[i]);
      else
        break;
  }
  for (int i = 0; i <= end; i++) printf("%c", s[i]);
  return 0;
}
