#include <bits/stdc++.h>
const int N = 200000 + 5;
int n, t;
char s[N];
int point, first_five;
inline void round_int() {
  s[0] = '0';
  int i = point;
  s[i] = '\0';
  --i;
  ++s[i];
  while (s[i] > '9') {
    s[i] = '0';
    ++s[i - 1];
    --i;
  }
  if (s[0] != '0')
    puts(s);
  else
    puts(s + 1);
}
int main() {
  scanf("%d%d%s", &n, &t, s + 1);
  point = -1;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '.') {
      point = i;
      break;
    }
  }
  first_five = -1;
  for (int i = point + 1; s[i]; ++i) {
    if (s[i] >= '5') {
      first_five = i;
      break;
    }
  }
  if (first_five == -1) {
    puts(s + 1);
    return 0;
  }
  for (int i = 1; i <= t && s[first_five] >= '5'; ++i) {
    s[first_five] = '\0';
    --first_five;
    if (first_five == point) {
      round_int();
      return 0;
    } else {
      ++s[first_five];
      while (s[first_five] > '9') {
        if (point == first_five - 1) {
          round_int();
          return 0;
        }
        s[first_five] = 0;
        ++s[--first_five];
      }
    }
  }
  puts(s + 1);
  return 0;
}
