#include <bits/stdc++.h>
using namespace std;
struct Pair {
  int index;
  int value;
  Pair(int index, int value) : index(index), value(value) {}
  bool operator<(const Pair &other) const { return value < other.value; }
  bool operator>(const Pair &other) const { return value > other.value; }
};
struct Tuple {
  int a;
  int b;
  int c;
  Tuple(int a, int b, int c) : a(a), b(b), c(c) {}
  bool operator<(const Tuple &other) const { return c < other.c; }
  bool operator>(const Tuple &other) const { return c > other.c; }
};
struct Wrap {
  int *index;
  Wrap(int *index) : index(index) {}
  bool operator<(const Wrap &other) const { return (*index) < (*other.index); }
  bool operator>(const Wrap &other) const { return (*index) > (*other.index); }
};
int in_i() {
  int result;
  scanf("%d", &result);
  return result;
}
long long in_l() {
  long long result;
  scanf("%I64d", &result);
  return result;
}
char in_c() {
  char result;
  scanf(" %c", &result);
  return result;
}
double in_d() {
  double result;
  scanf("%ld", &result);
  return result;
}
int n, m, k, t, u, v;
char ch;
double d;
int arr[200002];
int main() {
  n = in_i();
  t = in_i();
  int point_index;
  for (int i = 0; i < n; i++) {
    ch = in_c();
    if (ch == '.') {
      arr[i] = -1;
      point_index = i;
    } else {
      arr[i] = ch - '0';
    }
  }
  int first_index = point_index + 1;
  while (arr[first_index] < 5 && first_index < n) {
    first_index++;
  }
  while (first_index < n && t-- && arr[first_index] > 4) {
    first_index--;
    if (first_index == point_index) {
      first_index--;
      int index = first_index;
      arr[first_index]++;
      while (arr[index--] == 10) {
        arr[index]++;
        if (index != -1) arr[index + 1] = 0;
      }
      break;
    }
    arr[first_index]++;
  }
  for (int i = 0; i <= min(n - 1, first_index); i++) {
    if (i == point_index) {
      printf(".");
    } else
      printf("%d", arr[i]);
  }
  return 0;
}
