#include <bits/stdc++.h>
int dir1[] = {0, 0, 1, -1};
int dir2[] = {1, -1, 0, 0};
int dir3[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dir4[] = {-1, 1, -1, 0, 1, -1, 0, 1};
template <class T>
T power(T a, T b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 1)
    return a * power(a, b - 1);
  else {
    T k = power(a, b / 2);
    return k * k;
  }
}
template <class T>
T find(T node, T parent[]) {
  return parent[node] =
             (parent[node] == node) ? node : find(parent[node], parent);
}
template <class T>
T gcd(T a, T b) {
  return b == 0 ? a : gcd(b, a % b);
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
int set_bit(T N, T pos) {
  return N = N | (1 << pos);
}
template <class T>
bool check_bit(T N, T pos) {
  return N & (1 << pos);
}
template <class T>
int reset_bit(T N, T pos) {
  return N = N & ~(1 << pos);
}
using namespace std;
int main() {
  int n, t;
  while (2 == scanf("%d %d", &n, &t)) {
    char s[n + 5], s1[n + 5];
    scanf("%s", s1);
    for (int i = 1; i <= n; i++) s[i] = s1[i - 1];
    s[0] = '0';
    s[n + 1] = '\0';
    int x = -1;
    for (int i = 1; i <= n; i++) {
      if (s[i] == '.') {
        x = i;
        break;
      }
    }
    if (x == -1)
      printf("%s\n", s1);
    else {
      int carry = 0;
      int i = x + 1;
      for (; s[i] != '\0';) {
        if (s[i] >= '5' && i == x + 1 && t) {
          s[x] = '\0';
          i = x - 1;
          carry += 1;
          while (i > 0) {
            int temp = s[i] - 48 + carry;
            s[i] = temp % 10 + 48;
            carry = temp / 10;
            i--;
          }
          if (carry) s[0] = carry + 48;
          break;
        } else if (carry && i == x + 1) {
          i = x - 1;
          while (i > 0) {
            int temp = s[i] - 48 + carry;
            s[i] = temp % 10 + 48;
            carry = temp / 10;
            i--;
          }
          if (carry) s[0] = carry + 48;
          break;
        } else if (s[i] >= '5' && t) {
          s[i] = '\0';
          t--;
          i--;
          carry = 1;
          while (i > x) {
            if (t && s[i + 1] >= '5') {
              t--;
              carry += 1;
              s[i + 1] = '\0';
            }
            if (!carry && s[i + 1] < '5') break;
            int temp = s[i] - 48 + carry;
            s[i] = temp % 10 + 48;
            carry = temp / 10;
            i--;
          }
        }
        i++;
      }
      int len = strlen(s);
      for (int i = 0; i < len; i++) {
        if (s[i] == '.') {
          x = i;
          break;
        }
      }
      int j = len - 1;
      while (j >= x) {
        if (s[j] == '0') {
          s[j] = '\0';
        } else if (s[j] == '.') {
          s[j] = '\0';
          break;
        } else
          break;
        j--;
      }
      if (strlen(s) == 0)
        printf("0\n");
      else if (s[0] == '0') {
        for (int i = 1; s[i] != '\0'; i++) printf("%c", s[i]);
        puts("");
      } else
        printf("%s\n", s);
    }
  }
  return 0;
}
