#include <bits/stdc++.h>
using namespace std;
char str[220000];
bool cz[220000];
char cal(char c) {
  c++;
  if (c > '9')
    return '0';
  else
    return c;
}
void init() { memset(cz, 0, sizeof(cz)); }
int main() {
  int n, t;
  while (scanf("%d %d", &n, &t) != EOF) {
    init();
    scanf("%s", str);
    int len = strlen(str);
    bool haspoint = false;
    int ptx = -1;
    for (int i = 0; i < len; i++) {
      if (str[i] == '.') {
        haspoint = true;
        ptx = i;
      }
    }
    if (haspoint == false) {
      printf("%s\n", str);
      continue;
    }
    int st = -1;
    int cnt = 0;
    for (int i = ptx + 1; i < len; i++) {
      if (str[i] >= '5' && str[i] <= '9') {
        st = i;
        break;
      }
    }
    if (st == -1) {
      printf("%s\n", str);
      continue;
    }
    int now = st;
    int pre_aux = 0;
    int tmp_ans = 0;
    bool chao = false;
    while (true) {
      if (str[now - 1] == '.') {
        if (str[now] >= '5' && str[now] <= '9') {
          cz[now - 1] = cz[now] = 1;
          int pt = now - 2;
          int jinwei = 1;
          do {
            if (jinwei == 1) str[pt] = cal(str[pt]);
            if (str[pt] == '0')
              jinwei = 1;
            else {
              jinwei = 0;
              break;
            }
            pt--;
          } while (pt >= 0 && jinwei == 1);
          if (pt == -1) pre_aux = 1;
          chao = true;
          break;
        } else
          break;
      } else if (str[now] >= '5' && str[now] <= '9') {
        cz[now] = 1;
        now--;
        str[now] = cal(str[now]);
        cnt++;
        if (cnt >= t) break;
      } else
        break;
    }
    if (chao == true) {
      if (pre_aux == 1) printf("1");
      for (int i = 0; i < len; i++) {
        if (cz[i] == 1) break;
        printf("%c", str[i]);
      }
      printf("\n");
    } else {
      for (int i = 0; i < len; i++) {
        if (cz[i] == 1) break;
        printf("%c", str[i]);
      }
      printf("\n");
    }
  }
  return 0;
}
