#include <bits/stdc++.h>
const int N = 200010;
using namespace std;
char a[N];
int main() {
  int n, t;
  int i, flag = 0;
  scanf("%d%d", &n, &t);
  scanf("%s", a);
  for (i = 0; i < n / 2; i++) swap(a[i], a[n - i - 1]);
  int now = -1;
  for (i = n - 1; i >= 0; i--) {
    if (a[i] == '.') {
      flag = 1;
      continue;
    }
    if (flag) {
      if (a[i] >= '5') break;
    }
  }
  if (i < 0) {
    for (i = n - 1; i >= 0; i--) printf("%c", a[i]);
    return 0;
  } else
    now = i;
  while (a[now] >= '5' && t > 0) {
    if (a[now + 1] == '.') {
      a[now + 2]++;
      now += 2;
      int next = now;
      while (a[next] > '9') {
        a[next] -= 10;
        if (next + 1 == n) {
          n++;
          a[next + 1] = '1';
        } else
          a[next + 1]++;
        next++;
      }
      break;
    } else {
      a[now + 1]++;
      now += 1;
    }
    t--;
  }
  for (i = n - 1; i >= now; i--) {
    printf("%c", a[i]);
  }
  return 0;
}
