#include <bits/stdc++.h>
using namespace std;
void fun() {}
long long int __gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return __gcd(b, a % b);
}
void dfs(int par, int vis[], vector<int> g[]) {
  for (int i = 0; i < g[par].size(); i++) {
    int child = g[par][i];
    if (!vis[child]) {
      vis[child] = vis[par] + 1;
      dfs(child, vis, g);
    }
  }
}
long long int anss(long long int n) {
  long long int ans = 0;
  for (long long int i = 2; i < n; i++) {
    long long int nn = i * i * i;
    long long int nnn = n / nn;
    if (nnn <= 0) {
      break;
    }
    ans += nnn;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  fun();
  long long int n, t;
  cin >> n >> t;
  char arr[n];
  int dotpos = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == '.') {
      dotpos = i;
    }
  }
  int cnt = 0;
  int pos = n;
  int num = 0;
  int carry = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (i == dotpos) {
      continue;
    }
    int num = arr[i] - '0';
    if (i < dotpos) {
      if (num + carry >= 10) {
        arr[i] = num + carry - 10 + '0';
      } else {
        arr[i] = num + carry + '0';
      }
      carry = (num + carry) / 10;
      continue;
    }
    if (num >= 5) {
      carry = 1;
      cnt = 1;
      arr[i] = '0';
      pos = i;
    } else if (num + carry >= 5 && num + carry < 10 && cnt < t) {
      carry = 1;
      cnt++;
      arr[i] = '0';
      pos = i;
    } else if (num + carry >= 10) {
      carry = 1;
      arr[i] = num + carry - 10 + '0';
    } else {
      arr[i] = num + carry + '0';
      carry = 0;
    }
  }
  if (carry == 1) {
    cout << carry;
  }
  for (int i = 0; i < pos; i++) {
    if (i == dotpos && pos == dotpos + 1) {
      continue;
    }
    cout << arr[i];
  }
}
