#include <bits/stdc++.h>
using namespace std;
char s[200005];
int n, t, p;
int main() {
  scanf("%d%d", &n, &t);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; ++i)
    if (s[i] == '.') {
      p = i;
      break;
    }
  int tag = 0;
  for (int j = p + 1; j <= n; ++j) {
    if (s[j] > '4') {
      for (int k = j; k <= n; ++k) s[k] = 0;
      --t;
      for (int k = j - 1; k >= p; --k) {
        if (k == p)
          tag = 1, s[p] = 0;
        else {
          if (s[k] == '9')
            s[k] = 0;
          else {
            ++s[k];
            if (s[k] == '5' and t)
              --t, s[k] = 0;
            else
              break;
          }
        }
      }
    }
  }
  s[0] = '0';
  if (tag)
    for (int i = p - 1; ~i; --i)
      if (s[i] == '9')
        s[i] = '0';
      else {
        ++s[i];
        break;
      }
  if (s[0] == '1')
    printf("%s\n", s);
  else
    printf("%s\n", s + 1);
  return 0;
}
