#include <bits/stdc++.h>
using namespace std;
const long double PI = atan(1.0) * 4.0;
const long long int MOD = 1e9 + 7;
const long long int INF = 1e18;
const long double EPS = 0.0000001;
bool cmp(pair<string, int> a, pair<string, int> b) {
  return a.second > b.second;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long int n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  string d;
  long long int it = s.find('.');
  if (it == -1) {
    cout << s << "\n";
    return 0;
  }
  d = s.substr(it + 1);
  long long int dc = d.size(), indx = -1;
  string ans = s.substr(0, it + 1) + d;
  if (t >= 1000000000) d.erase(unique(d.begin(), d.end()), d.end());
  int cnt = 0;
  int g = 0, i = 0;
  if (d[0] == d[1]) {
    while (g != 1 && i != dc) {
      if (d[i] == d[i + 1])
        cnt++;
      else {
        cnt = 0;
      }
      i++;
      if (cnt > 180000) {
        g = 1;
        d.erase(unique(d.begin(), d.end()), d.end());
      }
    }
  }
  dc = d.size();
  for (long long int i = 0; i < dc; i++) {
    if (d[i] - '0' >= 5) {
      indx = i;
      break;
    }
  }
  dc = indx;
  string x = s.substr(0, it), p;
  long long int c = 0;
  if (dc != -1) {
    while (dc != 0 && t != 0) {
      if (d[dc] - '0' >= 5) {
        char h = d[dc - 1];
        d[dc - 1] = ((d[dc - 1] - '0') + 1 + c) % 10 + '0';
        c = ((h - '0') + 1 + c) / 10;
        d.erase(dc);
      } else
        c = 0;
      p = s.substr(0, it + 1) + d;
      if (ans < p) {
        ans = p;
      }
      t--;
      dc--;
    }
  }
  long long int bn = x.size() - 1;
  if (dc == 0 && d[dc] - '0' >= 5 && t != 0) {
    c = 1;
  }
  if (indx == -1) {
    cout << s << "\n";
    return 0;
  }
  char z;
  while (c != 0 && bn != -1) {
    z = x[bn];
    x[bn] = (x[bn] - '0' + c) % 10 + '0';
    c = (z - '0' + c) / 10;
    bn--;
  }
  if (c != 0) {
    reverse(x.begin(), x.end());
    x += (c + '0');
    reverse(x.begin(), x.end());
    cout << x << "\n";
    return 0;
  }
  if (x > ans)
    cout << x << "\n";
  else
    cout << ans << "\n";
  return 0;
}
