#include <bits/stdc++.h>
using namespace std;
int n, t;
char second[200005];
char ans[200005];
int main() {
  scanf("%d %d", &n, &t);
  scanf("%s", &second);
  int start = 0;
  for (int i = 0; i < n; i++) {
    if (second[i] == '.') {
      start = i + 1;
      break;
    }
  }
  int last = -1;
  for (int i = start; i < n; i++) {
    int now = (int)second[i] - '0';
    if (now >= 5 && t > 0) {
      last = i;
      ans[i] = 'x';
      break;
    }
  }
  for (int i = last + 1; i < n; i++) ans[i] = second[i];
  if (last == -1) {
    printf("%s\n", second);
    return 0;
  }
  t--;
  int car = 1;
  int T = last - 1;
  for (int i = last - 1; i >= 0; i--) {
    int now = (int)second[i] - '0';
    if (second[i] == '.') {
      ans[i] = '.';
      break;
    }
    if (car == 1) {
      now += car;
      car = 0;
    }
    if (now >= 5 && t > 0) {
      ans[i] = 'x';
      car = 1;
      t--;
      T = i;
      continue;
    } else {
      ans[i] = char(now + '0');
      T = i;
      break;
    }
    T = i;
    car = 0;
  }
  if (car == 1 && T == start || T == start - 1) {
    int carry = 1;
    for (int i = start - 2; i >= 0; i--) {
      int now = (int)second[i] - '0';
      if (now + carry >= 10) {
        ans[i] = '0';
        carry = 1;
        T = i;
        continue;
      } else {
        ans[i] = char(now + '1');
        carry = 0;
        T = i;
        break;
      }
    }
    if (carry == 1) printf("1");
    for (int i = 0; i < n; i++) {
      if (second[i] == '.') break;
      if (i < T) {
        printf("%c", second[i]);
      } else {
        if (ans[i] == 'x') return 0;
        printf("%c", ans[i]);
      }
    }
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (i < T) {
      printf("%c", second[i]);
    } else {
      if (ans[i] == 'x') return 0;
      printf("%c", ans[i]);
    }
  }
  printf("\n");
}
