#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-9;
void Debug(int i) { printf("\n----Debug %d-----\n", i); }
int n, t, now, r;
char a[200005];
void check() {
  for (int i = r - 1; i > now; --i) {
    if (a[i] != '0') break;
    a[i] = '\0';
  }
}
int main(void) {
  scanf("%d%d\n", &n, &t);
  scanf("%s", a);
  r = n;
  for (; now < r; ++now)
    if (a[now] == '.') break;
  while (t) {
    int num4 = 0;
    bool flag = 0;
    for (int i = now + 1; i < r; ++i) {
      if (a[i] >= '5') {
        flag = 1;
        if (i == now + 1) {
          a[now] = '\0';
          n = now - 1;
          a[now - 1] += 1;
          int idx = now - 1;
          for (; idx > 0; --idx) {
            if (a[idx] > '9') {
              a[idx - 1] += 1;
              a[idx] = '0';
            }
          }
          if (a[idx] > '9') {
            a[idx] = '0';
            printf("1");
          }
          printf("%s\n", a);
          return 0;
        } else {
          if (num4 != 0) {
            if (num4 <= t) {
              a[i - num4] = '5';
              a[i - num4 + 1] = '\0';
              r = i - num4 + 1;
              t -= num4;
            } else {
              a[i - t] = '5';
              a[i - t + 1] = '\0';
              r = i - t + 1;
              t = 0;
            }
          } else {
            a[i] = '\0';
            r = i;
            a[i - 1] += 1;
            int idx = i - 1;
            for (; idx > now + 1; --idx) {
              if (a[idx] > '9') {
                a[idx - 1] += 1;
                a[idx] = '0';
              } else
                break;
            }
            if (a[now + 1] > '9') {
              a[now + 1] = '0';
              a[now - 1] += 1;
              for (idx = now - 1; idx > 0; --idx) {
                if (a[idx] > '9') {
                  a[idx - 1] += 1;
                  a[idx] = '0';
                } else
                  break;
              }
              if (a[idx] > '9') {
                a[idx] = '0';
                printf("1");
                check();
                printf("%s\n", a);
                return 0;
              }
            }
            t--;
          }
        }
        break;
      }
      if (a[i] == '4')
        num4++;
      else
        num4 = 0;
    }
    if (flag == 0) break;
  }
  check();
  printf("%s\n", a);
  return 0;
}
