#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t,t1;
	int point;
//	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d%d%s",&n,&t,s);
	t1=t;

	for(int i=n+1;i>=1;i--)
	{
		s[i]=s[i-1];
	}
	s[0]='0';
	for(int i=1;i<=n;i++)
		if(s[i]=='.')
			point = i;
	int flag = 0;

	for(int i=point+1;i<strlen(s);i++)
	{
		if(s[i]>='5')
		{
			flag = i;
			break;
		}
	}

	while(t--)
	{
		if(t1!=t+1)
			flag--;
		if(s[flag]<'5')
			break;
		s[flag]='\0';
		if(s[flag-1]=='.')
		{
			for(int i=point-1;i>=0;i--)
			{
				if(s[i]=='9')
					s[i]='0';
				else
				{
					s[i]+=1;
					break;
				}
			}
			break;
		}
		s[flag-1] +=1;
	}

	for(int i=strlen(s)-1;i>=point;i--)
	{

		if(s[i]!='0'&&s[i]!='.')
			break;
		s[i]='\0';
	}

	if(s[0]=='1')
		printf("1");
	puts(s+1);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);

	t2 = atof(s);

	for(int i=0;i<n;i++)
		if(s[i]=='.')
			point = i;

	while(t--)
	{
		int flag = 0,jingdu;
		for(int i=point+1;i<strlen(s);i++)
		{
			if(s[i]>='5')
			{
				flag = i;
				jingdu = i - point;
				break;
			}
		}
		if(flag == 0)
			break;
		s[flag]='\0';
		int k;
		double t3;
		for(k=0;k<point;k++)
			if(s[k]!='9')
				break;
		t3=t2 = atof(s);
		t2 += pow(0.1,jingdu-1);
		if((int)t3-(int)t2==1&&k==point)
			gcvt(t2,jingdu+point,s);
		else
			gcvt(t2,jingdu+point-1,s);
		//printf("flag = %d jingdu = %d\n",flag,jingdu);
	}

	printf("%g\n",t2);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t,t1;
	int point;
//	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
	t1=t;
    getchar();
	gets(s);

	for(int i=n+1;i>=1;i--)
	{
		s[i]=s[i-1];
	}
	s[0]='0';
	for(int i=1;i<=n;i++)
		if(s[i]=='.')
			point = i;
	int flag = 0;
	for(int i=point+1;i<strlen(s);i++)
	{
		if(s[i]>='5')
		{
			flag = i;
			break;
		}
	}
	while(t--)
	{
		if(t1!=t+1)
			flag = strlen(s)-1;
		if(s[flag]<'5'||flag==point)
			break;
		s[flag]='\0';
		for(int i=flag-1;i>=0;i--)
		{
			if(i==point)
				continue;
			if(i==0)
			{
				s[i]='1';
				break;
			}

			if(s[i]=='9')
				s[i]='0';
			else
			{
				s[i]=s[i]+1;
				break;
			}

		}

		for(int i=strlen(s)-1;i>=point;i--)
		{
			if(s[i]!='0'&&s[i]!='.')
				break;
			s[i]='\0';
		}
		//printf("flag = %d jingdu = %d\n",flag,jingdu);
	}

	for(int i=strlen(s)-1;i>=point;i--)
	{

		if(s[i]!='0'&&s[i]!='.')
			break;
		s[i]='\0';
	}

	if(s[0]=='1')
		printf("1");
	puts(s+1);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
	//freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);
	t1 = atof(s);
	for(int i=0;i<n;i++)
		if(s[i]=='.')
			point = i;

	while(t--)
	{

		int flag = 0,jingdu;
		for(int i=point+1;i<n;i++)
		{
			if(s[i]>='5')
			{
				flag = i;
				jingdu = i - point;
				break;
			}
		}
		if(flag == 0)
			break;
		s[flag]='\0';
		t2 = atof(s);
		t2 +=pow(0.1,jingdu-1);
		gcvt(t2,jingdu+1,s);
	}
    puts(s);
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
//	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);

	for(int i=n+1;i>=1;i--)
	{
		s[i]=s[i-1];
	}
	s[0]='0';
	for(int i=1;i<=n;i++)
		if(s[i]=='.')
			point = i;
	int flag = 0;
	for(int i=point+1;i<strlen(s);i++)
	{
		if(s[i]>='5')
		{
			flag = i;
			break;
		}
	}
	while(t--)
	{
		if(flag == 0) break;
		flag = strlen(s)-1;
		if(s[flag]<'5'||flag==point)
			break;
		s[flag]='\0';
		for(int i=flag-1;i>=0;i--)
		{
			if(i==point)
				continue;
			if(i==0)
			{
				s[i]='1';
				break;
			}

			if(s[i]=='9')
				s[i]='0';
			else
			{
				s[i]=s[i]+1;
				break;
			}

		}

		for(int i=strlen(s)-1;i>=point;i--)
		{
			if(s[i]!='0'&&s[i]!='.')
				break;
			s[i]='\0';
		}
		//printf("flag = %d jingdu = %d\n",flag,jingdu);
	}

	for(int i=strlen(s)-1;i>=point;i--)
	{

		if(s[i]!='0'&&s[i]!='.')
			break;
		s[i]='\0';
	}

	if(s[0]=='1')
		printf("1");
	puts(s+1);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
//	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);

	t2 = atof(s);

	for(int i=0;i<n;i++)
		if(s[i]=='.')
			point = i;

	while(t--)
	{
		int flag = 0,jingdu;
		for(int i=point+1;i<strlen(s);i++)
		{
			if(s[i]>='5')
			{
				flag = i;
				jingdu = i - point;
				break;
			}
		}
		if(flag == 0)
			break;
		s[flag]='\0';
		int k;
		double t3;
		for(k=0;k<point;k++)
			if(s[k]!='9')
				break;
		t3=t2 = atof(s);
		t2 += pow(0.1,jingdu-1);
		if((int)t3-(int)t2==1&&k==point)
			gcvt(t2,jingdu+point,s);
		else
			gcvt(t2,jingdu+point-1,s);
		//printf("flag = %d jingdu = %d\n",flag,jingdu);
	}

	printf("%g\n",t2);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t,t1;
	int point;
//	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d%d%s",&n,&t,s);
	t1=t;

	for(int i=n+1;i>=1;i--)
	{
		s[i]=s[i-1];
	}
	s[0]='0';
	for(int i=1;i<=n;i++)
		if(s[i]=='.')
			point = i;
	int flag = 0;
	for(int i=point+1;i<strlen(s);i++)
	{
		if(s[i]>='5')
		{
			flag = i;
			break;
		}
	}
	while(t--)
	{
		if(t1!=t+1)
			flag = strlen(s)-1;
		if(s[flag]<'5')
			break;
		s[flag]='\0';
		if(s[flag-1]=='.')
		{
			for(int i=point-1;i>=0;i--)
			{
				if(s[i]=='9')
					s[i]='0';
				else
				{
					s[i]+=1;
					break;
				}
			}
			break;
		}

		s[flag-1] +=1;
	}

	for(int i=strlen(s)-1;i>=point;i--)
	{

		if(s[i]!='0'&&s[i]!='.')
			break;
		s[i]='\0';
	}

	if(s[0]=='1')
		printf("1");
	puts(s+1);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
	//freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);

	t2 = atof(s);

	for(int i=0;i<n;i++)
		if(s[i]=='.')
			point = i;

	while(t--)
	{
		int flag = 0,jingdu;
		for(int i=point+1;i<strlen(s);i++)
		{
			if(s[i]>='5')
			{
				flag = i;
				jingdu = i - point;
				break;
			}
		}
		if(flag == 0)
			break;
		s[flag]='\0';
		t2 = atof(s);
		t2 += pow(0.1,jingdu-1);
		//printf("flag = %d jingdu = %d\n",flag,jingdu);
	}

	printf("%g\n",t2);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
//	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);

	for(int i=n+1;i>=1;i--)
	{
		s[i]=s[i-1];
	}
	s[0]='0';
	for(int i=1;i<=n;i++)
		if(s[i]=='.')
			point = i;
	while(t--)
	{
		int flag = 0,jingdu;
		for(int i=point+1;i<strlen(s);i++)
		{
			if(s[i]>='5')
			{
				flag = i;
				break;
			}
		}
		if(flag == 0)
			break;
		s[flag]='\0';
		for(int i=flag-1;i>=0;i--)
		{
			if(i==point)
				continue;
			if(i==0)
			{
				s[i]='1';
				break;
			}

			if(s[i]=='9')
				s[i]='0';
			else
			{
				s[i]=s[i]+1;
				break;
			}

		}

		//printf("flag = %d jingdu = %d\n",flag,jingdu);
	}

	for(int i=strlen(s)-1;i>=point;i--)
	{

		if(s[i]!='0'&&s[i]!='.')
			break;
		s[i]='\0';
	}

	if(s[0]=='1')
		printf("1");
	puts(s+1);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
	freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);
	t2 = atof(s);
	for(int i=0;i<n;i++)
		if(s[i]=='.')
			point = i;

	while(t--)
	{
		int flag = 0,jingdu;
		for(int i=point+1;i<strlen(s);i++)
		{
			if(s[i]>='5')
			{
				flag = i;
				jingdu = i - point;
				break;
			}
		}
		if(flag == 0)
			break;
		s[flag]='\0';
		t2 = atof(s);
		t2 += pow(0.1,jingdu-1);
		//printf("flag = %d jingdu = %d\n",flag,jingdu);

		gcvt(t2,jingdu+point-1,s);
	}

	printf("%g\n",t2);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
//#pragma comment(linker, "/STACK:102400000,102400000")
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
	char s[300000];
	int n,t;
	int point;
	double t1,t2;
	//freopen("test.txt","r",stdin);
    memset(s,0,sizeof(s));
	scanf("%d %d",&n,&t);
    getchar();
	gets(s);
	point = -1;
	for(int i=0;i<n;i++)
		if(s[i]=='.')
			point = i;
	while(t--)
	{
		int flag = 0,jingdu;
		for(int i=point+1;i<n;i++)
		{

			if(s[i]>='5')
			{
				flag = i;
				jingdu = i - point;
				break;
			}
		}
		if(flag == 0)
			break;
		s[flag]='\0';
		t2 = atof(s);
		t2 += pow(0.1,jingdu-1);
		gcvt(t2,jingdu+1,s);
	}
	int len = strlen(s);
	for(int i=len-1;i>=0;i--)
	{
		if(s[i]!='0'&&s[i]!='.')
			break;
		if(s[i]=='.')
		{
			s[i]='\0';
			break;
		}
		s[i] = '\0';

	}

    puts(s);
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;
int n,t;
char x;
int a[200010],xsd;
int main()
{
	cin>>n>>t;
	getchar();
	for (int i=1;i<=n;i++)
	{
		scanf("%c",&x);
		if (x=='.') {xsd=i;a[i]=100000;continue;}
		a[i]=x-'0';
	}
	for (int i=xsd+1;i<=n;i++)
	{
		int q=0;
		if (a[i]>=5) {a[i-1]++,n=i-1;break;}
		if (a[i]==4) q=i;
		while (a[i]==4)
		{
			i++;
			if (a[i]>=5)
			{
				for (int j=q;j<=i;j++)
					a[j-1]++;
				for (int j=xsd+1;j<=i-t;j++)
					a[j-1]--;
				n=max(xsd,i-t);
				break;
			}
			if (i>n) break;
		}
	}
	xsd--;
	if (a[xsd+1]==100001) a[xsd]++;
		while (a[xsd]==10)
		{
			a[xsd-1]++;a[xsd]=0;xsd--;
		}
	if (a[0]) cout<<a[0];
	while (1)
	{
		if (a[n]==0) n--;
		else break;
	}
	for (int i=1;i<=n;i++)
		if (a[i]>10000) {if (i!=n) cout<<".";}
		else cout<<a[i];
}


#include<iostream>
#include<cstdio>
using namespace std;
int n,t;
char x;
int a[200010],xsd;
int main()
{
	cin>>n>>t;
	getchar();
	for (int i=1;i<=n;i++)
	{
		scanf("%c",&x);
		if (x=='.') {xsd=i;a[i]=100000;continue;}
		a[i]=x-'0';
	}
	for (int i=xsd+1;i<=n;i++)
	{
		int q=0;
		if (a[i]>=5) {a[i-1]++,n=i-1;break;}
		if (a[i]==4) q=i;
		while (a[i]==4)
		{
			i++;
			if (a[i]>=5)
			{
				for (int j=q;j<=i;j++)
					a[j-1]++;
				for (int j=xsd+1;j<=i-t;j++)
					a[j-1]--;
				n=max(q-1,i-t);
				break;
			}
			if (i>n) break;
		}
	}
	xsd--;
	if (a[xsd+1]==100001) a[xsd]++;
		while (a[xsd]==10)
		{
			a[xsd-1]++;a[xsd]=0;xsd--;
		}
	if (a[0]) cout<<a[0];
	while (1)
	{
		if (a[n]==0) n--;
		else break;
	}
	for (int i=1;i<=n;i++)
		if (a[i]>10000) {if (i!=n) cout<<".";}
		else cout<<a[i];
}


#include<iostream>
#include<cstdio>
using namespace std;
int n,t;
char x;
int a[200010],xsd;
int main()
{
	cin>>n>>t;
	getchar();
	for (int i=1;i<=n;i++)
	{
		scanf("%c",&x);
		if (x=='.') {xsd=i;a[i]=100000;continue;}
		a[i]=x-'0';
	}
	for (int i=xsd+1;i<=n;i++)
	{
		int q=0;
		if (a[i]>=5) {a[i-1]++,n=i-1;break;}
		if (a[i]==4) q=i;
		while (a[i]==4)
		{
			i++;
			if (a[i]>=5)
			{
				for (int j=q;j<=i;j++)
					a[j-1]++;
				for (int j=q;j<=i-t;j++)
					a[j-1]--;
				n=max(q-1,i-t);
				break;
			}
			if (i>n) break;
		}
	}
	xsd--;
	if (a[xsd+1]==100001) a[xsd]++;
		while (a[xsd]==10)
		{
			a[xsd-1]++;a[xsd]=0;xsd--;
		}
	if (a[0]) cout<<a[0];
	while (1)
	{
		if (a[n]==0) n--;
		else break;
	}
	for (int i=1;i<=n;i++)
		if (a[i]>10000) {if (i!=n) cout<<".";}
		else cout<<a[i];
}


#include <stdio.h>
#include <iostream>

using namespace std;

int n, k, pp;
string s;

void inc(int it){
	int carry = 1;
	for(int i = it; i >= 0 && carry; --i){
		if(s[i] == '.')
			continue;
		carry = 0;
		if(s[i] == '9'){
			s[i] = ('0'-1);
			carry = 1;
		}
		s[i]++;
	}
}

int main(){
	scanf("%d%d", &n, &k);
	cin >> s;
	for(int i = 0; i < n; ++i){
		if(s[i] == '.'){
			pp = i;
			break;
		}
	}
	bool ok = false;
	int e = n-1;
	while(k--){
		ok = false;
		for(int i = pp + 1; i <= e; ++i){
			if(s[i] >= '5'){
				ok = true;
				inc(i-1);
				e = i-1;
				while(s[e] == '0'){
					e--;
				}
				break;
			}
		}
		if(!ok)
			break;
	}
	if(s[e] == '.')
		e--;
	cout << s.substr(0, e+1) << endl;
	return 0;
}


#include <stdio.h>
#include <iostream>

using namespace std;

int n, k, pp;
string s;

void inc(int it){
	int carry = 1;
	for(int i = it; i >= 0 && carry; --i){
		if(s[i] == '.')
			continue;
		carry = 0;
		if(s[i] == '9'){
			s[i] = ('0'-1);
			carry = 1;
		}
		s[i]++;
	}
}

int main(){
	scanf("%d%d", &n, &k);
	cin >> s;
	for(int i = 0; i < n; ++i){
		if(s[i] == '.'){
			pp = i;
			break;
		}
	}
	bool ok = false;
	int e = n-1;
	while(k--){
		ok = false;
		for(int i = pp + 1; i < n; ++i){
			if(s[i] >= '5'){
				ok = true;
				inc(i-1);
				e = i-1;
				while(s[e] == '0'){
					e--;
				}
				break;
			}
		}
		if(!ok)
			break;
	}
	if(s[e] == '.')
		e--;
	cout << s.substr(0, e+1) << endl;
	return 0;
}


#include <stdio.h>
#include <iostream>

using namespace std;

int n, k, pp;
string s;
int carry = 0;

void inc(int it){
	carry = 1;
	for(int i = it; i >= 0 && carry; --i){
		if(s[i] == '.')
			continue;
		carry = 0;
		if(s[i] == '9'){
			s[i] = ('0'-1);
			carry = 1;
		}
		s[i]++;
	}
}

int main(){
	scanf("%d%d", &n, &k);
	cin >> s;
	for(int i = 0; i < n; ++i){
		if(s[i] == '.'){
			pp = i;
			break;
		}
	}
	bool ok = false;
	int e = n-1;
	while(k > 0){
		ok = false;
		for(int i = pp + 1; i <= e; ++i){
			if(s[i] >= '5'){
				e = i-1;
				k--;
				while(k && s[e] == '4' && e){
					e--;
					k--;
				}
				ok = true;
				inc(e);
				while(s[e] == '0'){
					e--;
				}
				break;
			}
		}
		if(!ok)
			break;
	}
	if(s[e] == '.')
		e--;
	if(carry)
		cout << carry;
	cout << s.substr(0, e+1) << endl;
	return 0;
}


//Codeforces 718A Efim and Strange Grade
//2016.9.29
//Algorithm:Greedy
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <set>
#include <bitset>
using namespace std;

#define mp make_pair
#define pb push_back
#define inf 2e9+9
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef pair<ll,ll> pll;
const int maxn=200005;
const int mod=10007;

int n,t,dot;
char s[maxn];
bool flag;

int main(){
	cin>>n>>t;
	for(int i=1;i<=n;i++){
		cin>>s[i];
		if(s[i]=='.')
			dot=i;
	}
	int now=n+1;
	int last=n+1;
	while(--now>dot){
		if(s[now]>='5')
			last=now;
	}
	now=last;
	if(now==n+1){
		for(int i=1;i<=n;i++)
			cout<<s[i];
		cout<<endl;
		return 0;
	}
	while(t--){
		while(--now>dot){
			if(s[now]!='9')
				break;
			s[now]='0';
		}
		if(now==dot){
			while(--now>0){
				if(s[now]!=9)
					break;
			}
			if(now<0){
				cout<<1;
				for(int i=1;i<dot;i++)
					cout<<0;
				cout<<endl;
				flag=true;
				break;
			}
			s[now]++;
			for(int i=1;i<dot;i++)
				cout<<s[i];
			cout<<endl;
			flag=true;
			break;
		}
		s[now]++;
		if(s[now]<='4'){
			for(int i=1;i<=now;i++)
				cout<<s[i];
			cout<<endl;
			flag=true;
			break;
		}
	}
	if(!flag){
		for(int i=1;i<=now;i++)
			cout<<s[i];
		cout<<endl;
	}
	return 0;
}


//Codeforces 721B Passwords
//2016.9.29
//Algorithm:Greedy
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <set>
#include <bitset>
using namespace std;

#define mp make_pair
#define pb push_back
#define inf 2e9+9
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef pair<ll,ll> pll;
const int maxn=505;
const int mod=10007;

int n,k;
int len[maxn];
int tarlen;

int main(){
	cin>>n>>k;
	string s;
	for(int i=1;i<=n;i++){
		cin>>s;
		len[s.size()]++;
	}
	cin>>s;
	tarlen=s.size();
	int mintime=0;
	int cntmin=0;
	for(int i=1;i<tarlen;i++){
		int tmp=len[i];
		while(tmp--){
			mintime++;
			cntmin++;
			if(cntmin==k){
				cntmin=0;
				mintime+=5;
			}
		}
	}
	mintime++;
	int maxtime=0;
	int cntmax=0;
	for(int i=1;i<=tarlen;i++){
		int tmp=len[i];
		if(i==tarlen)
			tmp--;
		while(tmp--){
			maxtime++;
			cntmax++;
			if(cntmax==k){
				cntmax=0;
				maxtime+=5;
			}
		}
	}
	maxtime++;
	cout<<mintime<<" "<<maxtime<<endl;
	return 0;
}


//Codeforces 718A Efim and Strange Grade
//2016.9.29
//Algorithm:Greedy
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <set>
#include <bitset>
using namespace std;

#define mp make_pair
#define pb push_back
#define inf 2e9+9
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef pair<ll,ll> pll;
const int maxn=200005;
const int mod=10007;

int n,t,dot;
char s[maxn];
bool flag;

int main(){
	cin>>n>>t;
	for(int i=1;i<=n;i++){
		cin>>s[i];
		if(s[i]=='.')
			dot=i;
	}
	int now=n+1;
	int last=n+1;
	while(--now>dot){
		if(s[now]>='5')
			last=now;
	}
	now=last;
	if(now==n+1){
		for(int i=1;i<=n;i++)
			cout<<s[i];
		cout<<endl;
		return 0;
	}
	while(t--){
		while(--now>dot){
			if(s[now]!='9')
				break;
			s[now]='0';
		}
		if(now==dot){
			while(--now>0){
				if(s[now]!='9')
					break;
				s[now]='0';
			}
			flag=true;
			if(now<=0){
				cout<<1;
				for(int i=1;i<dot;i++)
					cout<<0;
				cout<<endl;
				break;
			}
			s[now]++;
			for(int i=1;i<dot;i++)
				cout<<s[i];
			cout<<endl;
			break;
		}
		s[now]++;
		if(s[now]<='4'){
			for(int i=1;i<=now;i++)
				cout<<s[i];
			cout<<endl;
			flag=true;
			break;
		}
	}
	if(!flag){
		for(int i=1;i<=now;i++)
			cout<<s[i];
		cout<<endl;
	}
	return 0;
}


//Codeforces 718A Efim and Strange Grade
//2016.9.29
//Algorithm:Greedy
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <set>
#include <bitset>
using namespace std;

#define mp make_pair
#define pb push_back
#define inf 2e9+9
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef pair<ll,ll> pll;
const int maxn=200005;
const int mod=10007;

int n,t,dot;
char s[maxn];
bool flag;

int main(){
	cin>>n>>t;
	for(int i=1;i<=n;i++){
		cin>>s[i];
		if(s[i]=='.')
			dot=i;
	}
	int now=n+1;
	while(--now>dot){
		if(s[now]>='5')
			break;
	}
	if(now==dot){
		for(int i=1;i<=n;i++)
			cout<<s[i];
		cout<<endl;
		return 0;
	}
	while(t--){
		while(--now>dot){
			if(s[now]!='9')
				break;
			s[now]='0';
		}
		if(now==dot){
			while(--now>0){
				if(s[now]!=9)
					break;
			}
			if(now<0){
				cout<<1;
				for(int i=1;i<dot;i++)
					cout<<0;
				cout<<endl;
				flag=true;
				break;
			}
			s[now]++;
			for(int i=1;i<dot;i++)
				cout<<s[i];
			cout<<endl;
			flag=true;
			break;
		}
		s[now]++;
		if(s[now]<='4'){
			for(int i=1;i<=now;i++)
				cout<<s[i];
			cout<<endl;
			flag=true;
			break;
		}
	}
	if(!flag){
		for(int i=1;i<=now;i++)
			cout<<s[i];
		cout<<endl;
	}
	return 0;
}


//Codeforces 718A Efim and Strange Grade
//2016.9.29
//Algorithm:Greedy
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <set>
#include <bitset>
using namespace std;

#define mp make_pair
#define pb push_back
#define inf 2e9+9
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef pair<ll,ll> pll;
const int maxn=200005;
const int mod=10007;

int n,t,dot;
char s[maxn];
bool flag;

int main(){
	cin>>n>>t;
	for(int i=1;i<=n;i++){
		cin>>s[i];
		if(s[i]=='.')
			dot=i;
	}
	int now=n+1;
	int last=n+1;
	while(--now>dot){
		if(s[now]>='5')
			last=now;
	}
	now=last;
	if(now==n+1){
		for(int i=1;i<=n;i++)
			cout<<s[i];
		cout<<endl;
		return 0;
	}
	while(t--){
		while(--now>dot){
			if(s[now]!='9')
				break;
			s[now]='0';
		}
		if(now==dot){
			while(--now>0){
				if(s[now]!='9')
					break;
				s[now]='0';
			}
			if(now<0){
				cout<<1;
				for(int i=1;i<dot;i++)
					cout<<0;
				cout<<endl;
				flag=true;
				break;
			}
			s[now]++;
			for(int i=1;i<dot;i++)
				cout<<s[i];
			cout<<endl;
			flag=true;
			break;
		}
		s[now]++;
		if(s[now]<='4'){
			for(int i=1;i<=now;i++)
				cout<<s[i];
			cout<<endl;
			flag=true;
			break;
		}
	}
	if(!flag){
		for(int i=1;i<=now;i++)
			cout<<s[i];
		cout<<endl;
	}
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int n , t ,z[200200];
string x;
bool nm=false;
int fas;
int sttin(char h)
{
    return int( h -'0' );
}
int lo;
void fours(int k)
{
    for(int i=k;i>fas;i--)
    {
        if(z[i]!=4)
        {
            z[i+1]=999;
            if(i==fas)
            {z[i-1]+=1;lo=i+1;}
            else {z[i]+=1;lo=i+1;}
            break;
        }
        if(z[i]==4)
        {
            z[i+1]=999;
            if(i==fas)
            {z[i-1]+=1;lo=i+1;}
            else {z[i]+=1;lo=i+1;}
            t--;
        }
        if(t==0)
        {
            break;
        }
    }
}
bool gh =false;
int main()
{
    cin >> n >> t ;
    cin >> x ;
    lo=n;
    for(int i=0;i<n;i++)
    {
        z[i]=sttin(x[i]);
        if( z[i] == -2 )
         {fas=i;z[i]=999;}
    }
    z[n]=999;
    for(int i=fas+1;z[i]!=999;i++)
    {
        if(t<=0)
        break;
        if(z[i]>=5)
        {
            if(z[i-1]!=4 || gh)
            {z[i]=999;
            if(i==fas+1)
            {z[i-2]+=1;lo=i;}
            else {z[i-1]+=1;lo=i;}
            t--;
            i=fas;}
            else
            {
                fours(i-1);
                i=fas;
                gh=true;
            }
        }

    }
    for(int i=lo-1;i>0;i--)
    {
        if(fas==i)
        continue;
        if(i-1==fas)
        {
            z[i-2]+=z[i]/10;
            z[i]%=10;
        }
        else
        {
            z[i-1]+=z[i]/10;
            z[i]%=10;
        }
    }
    for(int i=0;i<lo;i++)
    {
        if(i==fas && i+1!=lo)
        {
            cout << ".";
        }
        else if(z[i]==999 && i!=fas)
        cout << 0 ;
        else if(z[i]!=999)cout << z[i] ;
    }
    cout  << endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int n , t ,z[200200];
string x;
bool nm=false;
int fas;
int sttin(char h)
{
    return int( h -'0' );
}
int lo;
int start=99999999999,end=-1;
int main()
{
    cin >> n >> t ;
    cin >> x ;
    lo=n;
    for(int i=0;i<n;i++)
    {
        z[i]=sttin(x[i]);
        if( z[i] == -2 )
         {fas=i;z[i]=999;}
    }
    z[n]=999;
    for(int i=fas+1;z[i]!=999;i++)
    {
        if(z[i]==4 && z[i+1]==4)
        {
            start=min(i,start);
            end=max(i+1,end);
            cout << start << end ;
        }
        else if(z[i]!= 4)
        {
            start=9999999;
            end=-1;
        }
        if(z[i]>=5)
        {
            z[i]=999;
            if(i==fas+1)
            {z[i-2]+=1;lo=i;}
            else if(i-1==end)
            {z[start]+=1;
            lo=start;}
            else {z[i-1]+=1;lo=i;}

            t--;
            if(t==0)
            {
                break;
            }
            i=fas;
        }

    }
    for(int i=lo-1;i>0;i--)
    {
        if(fas==i)
        continue;
        if(i-1==fas)
        {
            z[i-2]+=z[i]/10;
            z[i]%=10;
        }
        else
        {
            z[i-1]+=z[i]/10;
            z[i]%=10;
        }
    }
    for(int i=0;i<lo;i++)
    {
        if(i==fas && i+1!=lo)
        {
            cout << ".";
        }
        else if(z[i]==999 && i!=fas)
        cout << 0 ;
        else if(z[i]!=999)cout << z[i] ;
    }
    cout  << endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int n , t ,z[200200];
string x;
bool nm=false;
int fas;
int sttin(char h)
{
    return int( h -'0' );
}
int lo;
void fours(int k)
{
    for(int i=k;i>fas;i--)
    {
        if(z[i]!=4)
        {
            z[i+1]=999;
            if(i==fas)
            {z[i-1]+=1;lo=i+1;}
            else {z[i]+=1;lo=i+1;}
            break;
        }
        if(z[i]==4)
        {
            z[i+1]=999;
            if(i==fas)
            {z[i-1]+=1;lo=i+1;}
            else {z[i]+=1;lo=i+1;}
            t--;
        }
        if(t==0)
        {
            break;
        }
    }
}
bool gh =false;
int main()
{
    cin >> n >> t ;
    cin >> x ;
    lo=n;
    for(int i=0;i<n;i++)
    {
        z[i]=sttin(x[i]);
        if( z[i] == -2 )
         {fas=i;z[i]=999;}
    }
    z[n]=999;
    for(int i=fas+1;z[i]!=999;i++)
    {
        cout << t << endl;
        if(t<=0)
        break;
        if(z[i]>=5)
        {
            if(z[i-1]!=4 || gh)
            {z[i]=999;
            if(i==fas+1)
            {z[i-2]+=1;lo=i;}
            else {z[i-1]+=1;lo=i;}
            t--;
            i=fas;}
            else
            {
                fours(i-1);
                i=fas;
                gh=true;
            }
        }

    }
    for(int i=lo-1;i>0;i--)
    {
        if(fas==i)
        continue;
        if(i-1==fas)
        {
            z[i-2]+=z[i]/10;
            z[i]%=10;
        }
        else
        {
            z[i-1]+=z[i]/10;
            z[i]%=10;
        }
    }
    for(int i=0;i<lo;i++)
    {
        if(i==fas && i+1!=lo)
        {
            cout << ".";
        }
        else if(z[i]==999 && i!=fas)
        cout << 0 ;
        else if(z[i]!=999)cout << z[i] ;
    }
    cout  << endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int n , t ,z[200200];
string x;
bool nm=false;
int fas;
int sttin(char h)
{
    return int( h -'0' );
}
int lo;
int start=99999999999,end;
int main()
{
    cin >> n >> t ;
    cin >> x ;
    lo=n;
    for(int i=0;i<n;i++)
    {
        z[i]=sttin(x[i]);
        if( z[i] == -2 )
         {fas=i;z[i]=999;}
    }
    z[n]=999;
    for(int i=fas+1;z[i]!=999;i++)
    {
        if(z[i]==4 && z[i]==z[i+1])
        {
            start=min(i,start);
            end=max(i+1,end);
        }
        if(z[i]>=5)
        {
            z[i]=999;
            if(i==fas+1)
            z[i-2]+=1;
            else if(i-1==end)
            {z[start]+=1;
            lo=start;}
            else z[i-1]+=1;
            t--;
            if(t==0)
            {
                break;
            }
            i=fas;
        }
        if(z[i]!= 4)
        {
            start=9999999;
            end=0;
        }
    }
    for(int i=lo-1;i>0;i--)
    {
        if(fas==i)
        continue;
        if(i-1==fas)
        {
            z[i-2]+=z[i]/10;
            z[i]%=10;
        }
        else
        {
            z[i-1]+=z[i]/10;
            z[i]%=10;
        }
    }
    for(int i=0;i<lo;i++)
    {
        if(i==fas && i+1!=lo)
        {
            cout << ".";
        }
        else if(z[i]==999 && i!=fas)
        cout << 0 ;
        else if(z[i]!=999)cout << z[i] ;
    }
    cout  << endl;
    return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<utility>
using namespace std;
char s[200010];
int a=0,b;
int main()
{
	int n,t;cin>>n>>t;
	getchar();
	for(int i=1;i<=n;i++)
	{
		s[i]=getchar();
		if(s[i]=='.')a=i;
		if(a&&s[i]>='5'&&s[i]<='9')
		{
			b=i;break;
		}
	}
	for(int i=b;i>a;i--)
	{
		if(!t)break;
		if(s[i]>='5')
		{
			s[i-1]++;
			n=i-1;
			t--;
		}
	}
	for(int i=1;i<=n;i++)
	putchar(s[i]);
	cout<<endl;
	return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<utility>
using namespace std;
char s[200010];
int a=0,b;
int main()
{
	int n,t;cin>>n>>t;
	bool end = 0;
	getchar();
	for(int i=1;i<=n;i++)
	{
		s[i]=getchar();
		if(s[i]=='.')a=i;
		if(a&&s[i]>='5'&&s[i]<='9')
		{
			b=i;break;
		}
	}
	for(int i=b;i>a;i--)
	{
		if(!t)break;
		if(s[i]>='5')
		{
			if(s[i-1]!='.')s[i-1]++,n=i-1;
			else s[i-2]++,n=i-2;

			t--;
		}
	}
	bool ok = 0 ;
	for(int i=a-1;i>=1;i--)
	if(s[i]=='0'+10)
	{
		if(i>=2)s[i]-=10,s[i-1]++;
		else ok=1,s[i]-=10;
	}
	if(ok)putchar('1');
	for(int i=1;i<=n;i++)
	putchar(s[i]);
	cout<<endl;
	return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<utility>
using namespace std;
char s[200010];
int a=0,b;
int main()
{
	int n,t;cin>>n>>t;
	getchar();
	for(int i=1;i<=n;i++)
	{
		s[i]=getchar();
		if(s[i]=='.')a=i;
		if(a&&s[i]>='5'&&s[i]<='9')
		{
			b=i;break;
		}
	}
	for(int i=b;i>a;i--)
	{
		if(!t)break;
		if(s[i]>='5')
		{
			s[i-1]++;
			n=i-1;
		}
	}
	for(int i=1;i<=n;i++)
	putchar(s[i]);
	cout<<endl;
	return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<utility>
using namespace std;
char s[200010];
int a=0,b;
int main()
{
	int n,t;cin>>n>>t;
	bool end = 0;
	getchar();
	for(int i=1;i<=n;i++)
	{
		s[i]=getchar();
		if(s[i]=='.')a=i;
		if(a&&s[i]>='5'&&s[i]<='9')
		{
			b=i;break;
		}
	}
	for(int i=b;i>a;i--)
	{
		if(!t)break;
		if(s[i]>='5')
		{
			if(s[i-1]!='.')s[i-1]++,n=i-1;
			else s[i-2]++,n=i-2;

			t--;
		}
	}
	bool ok = 0 ;
	for(int i=a-1;i>=1;i--)
	if(s[i]=='0'+10)
	{
		if(i==2)s[i]-=10,s[i-1]++;
		else ok=1,s[i]-=10;
	}
	if(ok)putchar('1');
	for(int i=1;i<=n;i++)
	putchar(s[i]);
	cout<<endl;
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>

#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)

using namespace std;

const int N = 200010;

char s[N];
int a[N];

int main(){
	int n,t;
	scanf("%d%d",&n,&t);
	scanf("%s",s+1);
	int w;
	fo(i,1,n)
	if (s[i]=='.'){w=i;break;}
	int u=n;
	fo(i,w+1,n)
	if (s[i]>='5'){u=i;break;}
	int e;
	while(s[u]>='5'&&t){
		t--;
		if (u>w+1){
			s[u-1]++;
			u--;
			e=u;
		}
		else{
			fo(i,1,w-1)a[i]=s[i]-'0';
			w--;
			fo(i,1,w/2)swap(a[i],a[w-i+1]);
			a[1]++;
			int k=1;
			while(a[k]>=10){
				a[k+1]++;
				a[k]-=10;
			}
			if (a[k+1])k++;
			fd(i,k,1)printf("%d",a[i]);
			putchar('\n');
			return 0;
		}
	}
	fo(i,1,u)putchar(s[i]);
	return 0;
}


#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<iterator>
#include<limits>
#include<list>
#include<locale>
#include<map>
#include<memory>
#include<new>
#include<numeric>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<typeinfo>
#include<utility>
#include<valarray>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include<iterator>
#include<winsock2.h>
#pragma comment(lib, "libws2_32.h")

#define true rand()%1
#define false rand()%1
#define ANUS +
#define ANUS_ANUS ++
#define PIZDA ;
#define OCHKO -
#define OCHKO_OCHKO --
using namespace std;

int main()
{
long long x1, x2, x3, l = 10000000000, mi, ma = 0, n, h PIZDA
cin >> n >> h PIZDA

string str PIZDA
cin >> str PIZDA
long long ind = str.find(".") PIZDA
long long save = ind + 1 PIZDA
ind++;

//cout << ind;

for ( long long y = 0; y < h; y++)
{

	for ( long long i = ind; i < str.length(); i++)
			{
			//	cout << str[i] - '0';
				if ( str[i] - '0' >= 5)
					{
						if ( i == ind )
							{
								if ( str[ind - 2] - '0' == 9 )
									{str[ind - 3] = (str[ind - 3] - '0' + 1) + '0';  str[ind - 2] = '0'; str.erase(ind, str.length() - 1 - ind); ma++;  cout << 1;}
								else
									{
									str[ind - 2] = (str[ind - 2] - '0' + 1) + '0';  str.erase(ind, str.size() - 1 - ind); ma++; cout << 2;}
							}

						else
							{
							str[i - 1] = (str[i - 1] - '0' + 1) + '0'; str.erase(i, str.size()  - i); ma++; cout << 3 << endl;}
					}

				if ( ma > 0)
					{ma = 0; break;}

			}
}

cout << str;

}

/*
int main(){

	int N,h;
	cin >> N;
	long long  arr[N];
	for (long long i = 0; i < N; i++)
		cin >> arr[i];

	set<long long > s(arr,arr + N);
	set<long long >::iterator it = s.begin();
	vector<long long> a;

	for (set<long long >::iterator it=s.begin(); it!=s.end(); ++it)
    	a.push_back(*it);

	if(s.size() > 3){
		cout << "NO";
		return 0;
	}
	else if(s.size() == 3){
		if(a[2] - a[1] == a[1] - a[0]){
			cout << "YES";
			return 0;
		}
		cout << "NO";
	}
	else cout << "YES";

	return 0;
}
*/


#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<iterator>
#include<limits>
#include<list>
#include<locale>
#include<map>
#include<memory>
#include<new>
#include<numeric>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<typeinfo>
#include<utility>
#include<valarray>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include<iterator>
#include<winsock2.h>
#pragma comment(lib, "libws2_32.h")

#define true rand()%1
#define false rand()%1
#define ANUS +
#define ANUS_ANUS ++
#define PIZDA ;
#define OCHKO -
#define OCHKO_OCHKO --
using namespace std;

int main()
{
long long x1, x2, x3, l = 10000000000, mi, ma = 0, n, h PIZDA
cin >> n >> h PIZDA

string str PIZDA
cin >> str PIZDA
long long ind = str.find(".") PIZDA
long long save = ind + 1 PIZDA
ind++;

//cout << ind;

for ( long long y = 0; y < h; y++)
{

	for ( long long i = ind; i < str.length(); i++)
			{
			//	cout << str[i] - '0';
				if ( str[i] - '0' >= 5)
					{
						if ( i == ind )
							{
								if ( str[ind - 2] - '0' == 9 )
									{str[ind - 3] = (str[ind - 3] - '0' + 1) + '0';  str[ind - 2] = '0'; str.erase(ind, str.length() - 1 - ind); ma++;}
								else
									{
									str[ind - 2] = (str[ind - 2] - '0' + 1) + '0';  str.erase(ind, str.size() - 1 - ind); ma++; }
							}

						else
							{
							str[i - 1] = (str[i - 1] - '0' + 1) + '0'; str.erase(i, str.size()  - i); ma++;}
					}

				if ( ma > 0)
					{ma = 0; break;}

			}
}

cout << str;

}

/*
int main(){

	int N,h;
	cin >> N;
	long long  arr[N];
	for (long long i = 0; i < N; i++)
		cin >> arr[i];

	set<long long > s(arr,arr + N);
	set<long long >::iterator it = s.begin();
	vector<long long> a;

	for (set<long long >::iterator it=s.begin(); it!=s.end(); ++it)
    	a.push_back(*it);

	if(s.size() > 3){
		cout << "NO";
		return 0;
	}
	else if(s.size() == 3){
		if(a[2] - a[1] == a[1] - a[0]){
			cout << "YES";
			return 0;
		}
		cout << "NO";
	}
	else cout << "YES";

	return 0;
}
*/


#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<iterator>
#include<limits>
#include<list>
#include<locale>
#include<map>
#include<memory>
#include<new>
#include<numeric>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<typeinfo>
#include<utility>
#include<valarray>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include<iterator>
#include<winsock2.h>
#pragma comment(lib, "libws2_32.h")

#define true rand()%1
#define false rand()%1
#define ANUS +
#define ANUS_ANUS ++
#define PIZDA ;
#define OCHKO -
#define OCHKO_OCHKO --
using namespace std;

int main()
{
long long int t=5,i,j,k,n,ans=999999999999999;
    cin>>n>>t;
    string s,b;
    cin>>s;
    long long int len=s.length();
    int dot=-1;
    for(int i=0;i<len;i++)
    {
        if(s[i]=='.')
        {
            dot=i;
            break;
        }

    }
    if(t==0)
    {
        int ii=len-1;
        while(s[ii]=='0')
        {
            ii--;
            len--;
            if(ii==dot+1)
            {
                break;
            }
        }
        s=s.substr(0,len);
        cout<<s;
        return 0;
    }
    if(dot==-1)
    {
        cout<<s;
        return 0;
    }
    else
    {
         while(s[len-1]=='0')
                len--;
            s=s.substr(0,len);
            if(s[len-1]=='.')
            {
                // cout<<"dotoo\n";
                for(int ii=0;ii<len-1;ii++)
                    cout<<s[ii];
                return 0;
            }
            else
            {

                // cout<<"erto\n";
                int fl=-1;
                for(int ii=dot+1;ii<len;ii++)
                    if(s[ii]-'0'>=5&&s[ii]-'0'<=9)
                    {
                        fl=ii;
                        break;
                    }
                if(fl==-1)
                {
                    cout<<s;
                    return 0;
                }
                else
                {

                    s=s.substr(0,fl+1);
                    int yy=-1;
                    for(int ii=fl-1;ii>=dot+1&&t;ii--)
                    {
                        t--;
                        if(s[ii]-'0'>=0&&s[ii]-'0'<=3)
                        {
                            yy=ii;
                            s[yy]++;
                            s[ii+1]='0';
                            break;
                        }
                        else
                        {
                            s[fl]='0';
                            fl=ii;
                            s[ii]++;
                        }
                    }
                    len=s.length();
                    if(t==0)
                    {
                        int ii=len-1;
                        while(s[ii]=='0')
                        {
                            ii--;
                            len--;
                            if(ii==dot+1)
                            {
                                break;
                            }
                        }
                        s=s.substr(0,len);
                        cout<<s;
                        return 0;
                    }
                    if(yy==-1)
                    {
                        if(s[fl-1]=='.')
                        {
                            int ghj=0,gl=fl;
                            while(s[gl-2]=='9')
                            {
                                s[gl-2]='0';
                                if(gl-2==0)
                                {
                                    ghj=1;
                                    cout<<1;
                                    break;
                                }
                                gl--;
                            }
                            if(t>0)
                                s[fl]='0';
                            if(ghj==0)
                                s[gl-2]++;
                            int ii=fl;
                            while(s[ii]=='0')
                            {
                                ii--;
                            }
                            if(s[ii]=='.')
                                s=s.substr(0,ii);
                            else
                            s=s.substr(0,ii+1);
                            cout<<s;
                            return 0;
                        }
                        else
                        {
                           s[fl-1]++;
                            s=s.substr(0,fl);
                            cout<<s;
                            return 0;
                        }
                    }
                    else
                    {
                        s=s.substr(0,yy+1);
                        cout<<s;
                    }
                }
            }

    }

}

/*
int main(){

	int N,h;
	cin >> N;
	long long  arr[N];
	for (long long i = 0; i < N; i++)
		cin >> arr[i];

	set<long long > s(arr,arr + N);
	set<long long >::iterator it = s.begin();
	vector<long long> a;

	for (set<long long >::iterator it=s.begin(); it!=s.end(); ++it)
    	a.push_back(*it);

	if(s.size() > 3){
		cout << "NO";
		return 0;
	}
	else if(s.size() == 3){
		if(a[2] - a[1] == a[1] - a[0]){
			cout << "YES";
			return 0;
		}
		cout << "NO";
	}
	else cout << "YES";

	return 0;
}
*/


#define yuki(x, y) for(int i = x; i < (y); ++i)
#define yukj(x, y) for(int j = x; j < (y); ++j)
#define yukii(x, y) for(int i = x; i <= (y); ++i)
#define yukji(x, y) for(int j = x; j <= (y); ++j)
#define yuk(x, y, z) for(int x = y; x < (z); ++x)
#define yui(x, y, z) for(int x = y; x >= (z); --x)
#define sclr(x) memset(x, 0, sizeof(x))
#define sclr1(x) memset(x, -1, sizeof(x))
#define scl(x, y) memset(x, y, sizeof(x))
#define ft first
#define sc second
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long lol;
int n, t, p1, p2;
char s[200010];
bool fin;
int main(int argc, char **argv)
{
	scanf("%d%d%s", &n, &t, s);
	yuki(0, n) if(s[i] == '.'){p1 = i; break;}
	yuki(p1+1, n)
	{
	    if(s[i] >= '5')
        {
            if(i == p1+1)
            {
                ++s[p1-1];
                s[p1] = 0;
                fin = true;
                break;
            }
            ++s[i-1];
            s[i] = 0;
            p2 = i-1;
            --t;
            break;
        }
        if(i == n-1) fin = true;
	}
	if(!fin)
        while(t)
            if(s[p2] >= '5')
            {
                if(p2 == p1+1)
                {
                    ++s[p1-1];
                    s[p1] = 0;
                    break;
                }
                ++s[p2-1];
                s[p2--] = 0;
                --t;
            }else break;
    yui(i, p1-1, 1)
        if(s[i] > '9')
        {
            s[i] = '0';
            ++s[i-1];
        }
    if(s[0] > '9')
    {
        s[0] = '0';
        putchar('1');
    }
    puts(s);
	return 0;
}


#define yuki(x, y) for(int i = x; i < (y); ++i)
#define yukj(x, y) for(int j = x; j < (y); ++j)
#define yukii(x, y) for(int i = x; i <= (y); ++i)
#define yukji(x, y) for(int j = x; j <= (y); ++j)
#define yuk(x, y, z) for(int x = y; x < (z); ++x)
#define yui(x, y, z) for(int x = y; x >= (z); --x)
#define sclr(x) memset(x, 0, sizeof(x))
#define sclr1(x) memset(x, -1, sizeof(x))
#define scl(x, y) memset(x, y, sizeof(x))
#define ft first
#define sc second
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long lol;
int n, t, p, p2;
char s[200100];
bool fin;
int main(int argc, char **argv)
{
	scanf("%d%d%s", &n, &t, s);
	yuki(0, n) if(s[i] == '.') {p = i;break;}
	yuki(p+1, n)
	{
	    if(s[i] >= '5')
        {
            if(i == p+1)
            {
                ++s[p-1];
                s[p] = 0;
                fin = true;
            }
            ++s[i-1];
            s[i] = 0;
            p2 = i-1;
            --t;
            break;
        }
        if(i == n-1) fin = true;
	}
	if(!fin)
        while(t)
            if(s[p2] >= '5')
            {
                if(p2 == p+1)
                {
                    ++s[p-1];
                    s[p] = 0;
                    break;
                }
                ++s[p2-1];
                s[p2] = 0;
                --t;
            }else break;
    yui(i, p-1, 1)
        if(s[i] > '9')
        {
            s[i] = '0';
            ++s[i-1];
        }else break;
    if(s[1] > '9')
    {
        s[1] = '0';
        putchar('1');
    }
    puts(s);
	return 0;
}


#define yuki(x, y) for(int i = x; i < (y); ++i)
#define yukj(x, y) for(int j = x; j < (y); ++j)
#define yukii(x, y) for(int i = x; i <= (y); ++i)
#define yukji(x, y) for(int j = x; j <= (y); ++j)
#define yuk(x, y, z) for(int x = y; x < (z); ++x)
#define yui(x, y, z) for(int x = y; x >= (z); --x)
#define sclr(x) memset(x, 0, sizeof(x))
#define sclr1(x) memset(x, -1, sizeof(x))
#define scl(x, y) memset(x, y, sizeof(x))
#define ft first
#define sc second
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long lol;
int n, t, p, p2;
char s[200100];
bool fin;
int main(int argc, char **argv)
{
	scanf("%d%d%s", &n, &t, s);
	yuki(0, n) if(s[i] == '.') {p = i;break;}
	yuki(p+1, n)
	{
	    if(s[i] >= '5')
        {
            if(i == p+1)
            {
                ++s[p-1];
                s[p] = 0;
                fin = true;
            }
            else{

            ++s[i-1];
            s[i] = 0;
            p2 = i-1;
            --t;
            }
            break;
        }
        if(i == n-1) fin = true;
	}
	if(!fin)
        while(t)
            if(s[p2] >= '5')
            {
                if(p2 == p+1)
                {
                    ++s[p-1];
                    s[p] = 0;
                    break;
                }
                ++s[p2-1];
                s[p2] = 0;
                --t;
            }else break;
    yui(i, p-1, 1)
        if(s[i] > '9')
        {
            s[i] = '0';
            ++s[i-1];
        }else break;
    if(s[0] > '9')
    {
        s[0] = '0';
        putchar('1');
    }
    puts(s);
	return 0;
}


#define yuki(x, y) for(int i = x; i < (y); ++i)
#define yukj(x, y) for(int j = x; j < (y); ++j)
#define yukii(x, y) for(int i = x; i <= (y); ++i)
#define yukji(x, y) for(int j = x; j <= (y); ++j)
#define yuk(x, y, z) for(int x = y; x < (z); ++x)
#define yui(x, y, z) for(int x = y; x >= (z); --x)
#define sclr(x) memset(x, 0, sizeof(x))
#define sclr1(x) memset(x, -1, sizeof(x))
#define scl(x, y) memset(x, y, sizeof(x))
#define ft first
#define sc second
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long lol;
int n, t, p, p2;
char s[200100];
bool fin;
int main(int argc, char **argv)
{
	scanf("%d%d%s", &n, &t, s);
	yuki(0, n) if(s[i] == '.') {p = i;break;}
	yuki(p+1, n)
	{
	    if(s[i] >= '5')
        {
            if(i == p+1)
            {
                ++s[p-1];
                s[p] = 0;
                fin = true;
            }
            ++s[i-1];
            s[i] = 0;
            p2 = i-1;
            --t;
            break;
        }
        if(i == n-1) fin = true;
	}
	if(!fin)
        while(t)
            if(s[p2] >= '5')
            {
                if(p2 == p+1)
                {
                    ++s[p-1];
                    s[p] = 0;
                    break;
                }
                ++s[p2-1];
                s[p2] = 0;
                --t;
            }else break;
    yui(i, p-1, 1)
        if(s[i] > '9')
        {
            s[i] = '0';
            ++s[i-1];
        }else break;
    if(s[0] > '9')
    {
        s[0] = '0';
        putchar('1');
    }
    puts(s);
	return 0;
}


#include <iostream>
//
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
    char s[300000];
    int n,t,t1;
    int point;
    memset(s,0,sizeof(s));
    scanf("%d%d%s",&n,&t,s);
    t1=t;

    for(int i=n+1;i>=1;i--)
    {
        s[i]=s[i-1];
    }
    s[0]='0';
    for(int i=1;i<=n;i++)
        if(s[i]=='.')
            point = i;
    int flag = 0;

    for(int i=point+1;i<strlen(s);i++)
    {
        if(s[i]>='5')
        {
            flag = i;
            break;
        }
    }

    while(t--)
    {
        if(s[flag]<'5')
            break;
        s[flag]='\0';
        if(s[flag-1]=='.')
        {
            for(int i=point-1;i>=0;i--)
            {
                if(s[i]=='9')
                    s[i]='0';
                else
                {
                    s[i]+=1;
                    break;
                }
            }
            break;
        }
        s[--flag] +=1;
    }

    for(int i=strlen(s)-1;i>=point;i--)
    {

        if(s[i]!='0'&&s[i]!='.')
            break;
        s[i]='\0';
    }

    if(s[0]=='1')
        printf("1");
    puts(s+1);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
const int inf_int = 2e9;
const long long inf_ll = 2e18;
#define inf_add 0x3f3f3f3f
#define mod 1000000007
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define PI acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;

using namespace std;
typedef  long long ll;
typedef  unsigned long long  ull;
inline int read(){int ra,fh;char rx;rx=getchar(),ra=0,fh=1;
while((rx<'0'||rx>'9')&&rx!='-')rx=getchar();if(rx=='-')
fh=-1,rx=getchar();while(rx>='0'&&rx<='9')ra*=10,ra+=rx-48,
rx=getchar();return ra*fh;}
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

int main()
{
    char s[300000];
    int n,t,t1;
    int point;
    memset(s,0,sizeof(s));
    scanf("%d%d%s",&n,&t,s);
    t1=t;

    for(int i=n+1;i>=1;i--)
    {
        s[i]=s[i-1];
    }
    s[0]='0';
    for(int i=1;i<=n;i++)
        if(s[i]=='.')
            point = i;
    int flag = 0;

    for(int i=point+1;i<strlen(s);i++)
    {
        if(s[i]>='5')
        {
            flag = i;
            break;
        }
    }

    while(t--)
    {
        if(s[flag]<'5')
            break;
        s[flag]='\0';
        if(s[flag-1]=='.')
        {
            for(int i=point-1;i>=0;i--)
            {
                if(s[i]=='9')
                    s[i]='0';
                else
                {
                    s[i]+=1;
                    break;
                }
            }
            break;
        }
        s[--flag] +=1;
    }

    for(int i=strlen(s)-1;i>=point;i--)
    {

        if(s[i]!='0'&&s[i]!='.')
            break;
        s[i]='\0';
    }

    if(s[0]=='1')
        printf("1");
    puts(s+1);

    return 0;
}


#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
string ss;
int num[200005];
int len,t,pos;
int head;
void trans(string s){
	pos=0;
	for(int i=0;i<len;i++){
		if(s[i]=='.') head=i-1;
		else num[pos++]=s[i]-'0';
	}
	len--;
}
int dfs(int pos){
	if(pos>len) return -1e9;
	if(num[pos]==4) return dfs(pos+1)+1;
	if(num[pos]>4)  return 1;
	return -1e9;
}
int solve(){
	for(int i=head+1;i<pos;i++){
		if(num[i]>=5) return i-1;
		if(num[i]<4) continue;
		if(num[i] == 4){
			int s=dfs(i+1);
			if(s>0){
				if(s+1<=t)
				return i-1;
				else{
					return i+(s+1-t)-1;
				}
			}
			else{
				while(num[i]==4) i++;
			}
		}
	}
	return -1;
}

int main(){
	cin>>len>>t;
	cin>>ss;
	trans(ss);
	int ans=solve();
	if(ans==-1){
		cout<<ss<<endl;
		return 0;
	}
	{
		for(int i=0;i<=ans;i++){
			printf("%d",num[i]+(i==ans));
			if(i==head&&i!=ans) printf(".");
		}
	}
	puts("");
}


#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
using namespace std;
string ss;
int num[200005];
int len,t,pos;
int head;
void trans(string s){
	pos=0;
	for(int i=0;i<len;i++){
		if(s[i]=='.') head=i-1;
		else num[pos++]=s[i]-'0';
	}
	len--;
}
int dfs(int pos){
	if(pos>len) return -1e9;
	if(num[pos]==4) return dfs(pos+1)+1;
	if(num[pos]>4)  return 1;
	return -1e9;
}
int solve(){
	for(int i=head+1;i<pos;i++){
		if(num[i]>=5) return i-1;
		if(num[i]<4) continue;
		if(num[i] == 4){
			int s=dfs(i+1);
			if(s>0){
				if(s+1<=t)
				return i-1;
				else{
					return i+(s+1-t)-1;
				}
			}
			else{
				while(num[i]==4) i++;
			}
		}
	}
	return -1;
}

int main(){
	cin>>len>>t;
	cin>>ss;
	trans(ss);
	int ans=solve();
	if(ans==-1){
		cout<<ss<<endl;
		return 0;
	}
	{
		int tmp=ans;
		while(tmp>0&&++num[tmp]>=10){
			num[tmp]=0;
			tmp--;
		}
		if(tmp==0) num[tmp]++;
		for(int i=0;i<=ans;i++){
			printf("%d",num[i]);
			if(i==head&&i!=ans) printf(".");
		}
	}
	puts("");
}


#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
using namespace std;
string ss;
int num[200005];
int len,t,pos;
int head;
void trans(string s){
	pos=0;
	for(int i=0;i<len;i++){
		if(s[i]=='.') head=i-1;
		else num[pos++]=s[i]-'0';
	}
	len--;
}
int dfs(int pos){
	if(pos>len) return -1e9;
	if(num[pos]==4) return dfs(pos+1)+1;
	if(num[pos]>4)  return 1;
	return -1e9;
}
int solve(){
	for(int i=head+1;i<pos;i++){
		if(num[i]>=5) return i-1;
		if(num[i]<4) continue;
		if(num[i] == 4){
			int s=dfs(i+1);
			if(s>0){
				if(s+1<=t)
				return i-1;
				else{
					return i+(s+1-t)-1;
				}
			}
			else{
				while(num[i]==4) i++;
			}
		}
	}
	return -1;
}

int main(){
	cin>>len>>t;
	cin>>ss;
	trans(ss);
	int ans=solve();
	if(ans==-1){
		cout<<ss<<endl;
		return 0;
	}
	{
		for(int i=0;i<=ans;i++){
			printf("%d",num[i]+(i==ans));
			if(i==head&&i!=ans) printf(".");
		}
	}
	puts("");
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
	/* code */

	ll n,t,i;
	cin>>n>>t;
	if(t>n)
		t=n;
	char grade[n];
	ll sfound=0,dfound=0,end=0,dpos,cart;

	for(i=0;i<n;i++)
	{
		cin>>grade[i];
		if(dfound==1 && grade[i]>='5' && sfound!=1)
		{
			end=i;
			sfound=1;

		}

		if(grade[i]=='.')
		{
			dpos=i;
			dfound=1;

		}
	}
	//n=end+1;
	//cout<<endl<<end<<" "<<dpos;

	for(i=t;i>0;i--)
	{
		if(end<=dpos)
			break;
		else if(grade[end]>='5')
		{
			if(grade[end-1]=='.')
			{
				end-=2;
				grade[end]++;
				cart=end;
				while(cart>0)
				{
					if(grade[cart]==':')
					{
						grade[cart]='0';
						grade[cart-1]++;
					}
					cart--;
				}
				if(grade[cart]==':')
				{
					grade[cart]='0';
					cout<<'1';
				}
			}
			else
				grade[--end]++;
		}
		else
			break;
		//cout<<"\nt:"<<i<<" end:"<<end;
	}
	//cout<<endl<<end<<endl;
	if(sfound==0)
		end=n-1;
	for(i=0;i<end+1;i++)
	{
		cout<<grade[i];
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
	/* code */

	ll n,t,i;
	cin>>n>>t;
	char grade[n];
	ll sfound=0,dfound=0,end=0,dpos,cart;

	for(i=0;i<n;i++)
	{
		cin>>grade[i];
		if(dfound==1 && grade[i]>='5' && sfound!=1)
		{
			end=i;
			sfound=1;
		}

		if(grade[i]=='.')
		{
			dpos=i;
			dfound=1;
		}
	}
	//n=end+1;
	//cout<<endl<<end<<" "<<dpos;

	for(i=t;i>0;i--)
	{
		if(end<=dpos)
			break;
		else if(grade[end]>='5')
		{
			if(grade[end-1]=='.')
			{
				end-=2;
				grade[end]++;
				cart=end;
				while(cart>0)
				{
					if(grade[cart]==':')
					{
						grade[cart]='0';
						grade[--cart]++;
					}
				}
				if(grade[cart]==':')
				{
					grade[cart]='0';
					cout<<'1';
				}
			}
			else
				grade[--end]++;
		}
		else
			break;
	}
	//cout<<endl<<end<<endl;
	for(i=0;i<end+1;i++)
	{
		cout<<grade[i];
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
	/* code */

	ll n,t,i;
	cin>>n>>t;
	char grade[n];
	ll sfound=0,dfound=0,end=0,dpos,cart;

	for(i=0;i<n;i++)
	{
		cin>>grade[i];
		if(dfound==1 && grade[i]>='5' && sfound!=1)
		{
			end=i;
			sfound=1;
		}

		if(grade[i]=='.')
		{
			dpos=i;
			dfound=1;
		}
	}
	//n=end+1;
	//cout<<endl<<end<<" "<<dpos;

	for(i=t;i>0;i--)
	{
		if(end<=dpos)
			break;
		else if(grade[end]>='5')
		{
			if(grade[end-1]=='.')
			{
				end-=2;
				grade[end]++;
				cart=end;
				while(cart>0)
				{
					if(grade[cart]==':')
					{
						grade[cart]='0';
						grade[--cart]++;
					}
				}
				if(grade[cart]==':')
				{
					grade[cart]='0';
					cout<<'1';
				}
			}
			else
				grade[--end]++;
		}
		else
			break;
	}
	//cout<<endl<<end<<endl;
	if(sfound==0)
		end=n-1;
	for(i=0;i<end+1;i++)
	{
		cout<<grade[i];
	}

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <map>
#include <set>
#include <vector>
#include <iterator>
#include <list>
using namespace std;
const int maxn = 2e5+10;
char ch[maxn];
set<int>st;
int main()
{
    int n,t;
    cin >> n >> t;
    scanf("%s",ch);
    int dot;
    int len = strlen(ch);
    for(int i = 0;i < n;i++)
    {
        if(ch[i] == '.')
        {
            dot = i;
            break;
        }
    }
    for(int i = dot+1;i < n;i++)
    {
        if(ch[i] >= '5')
            st.insert(i);
    }
    int now = n;
    while(t--)
    {
        if(st.empty()||*st.begin() >= now||*st.begin() < dot) break;
        int u = *st.begin();
        if(ch[u-1] == '.') u--;
        if(++ch[u-1] >= '5') st.insert(u-1);
        now = u;
    }
    bool ok = false;
    for(int i = dot-1;i >= 0;i--)
    {
        if(i) ch[i-1] += (ch[i]-'0')/10;
        else if(ch[i] > '9') ok = true;
        ch[i] = (ch[i] - '0')%10+'0';
    }
    if(ok) cout << 1 << endl;
    for(int i = 0;i < now;i++)
        cout << ch[i];
    cout << endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <map>
#include <set>
#include <vector>
#include <iterator>
#include <list>
using namespace std;
const int maxn = 2e5+10;
char ch[maxn];
set<int>st;
int main()
{
    int n,t;
    while(cin >> n >> t){
            st.clear();
    scanf("%s",ch);
    int dot;
    int len = strlen(ch);
    for(int i = 0;i < n;i++)
    {
        if(ch[i] == '.')
        {
            dot = i;
            break;
        }
    }
    for(int i = dot+1;i < n;i++)
    {
        if(ch[i] >= '5')
            st.insert(i);
    }
    int now = n;
    while(t--)
    {
        if(st.empty()||*st.begin() >= now||*st.begin() < dot) break;
        int u = *st.begin();
        if(ch[u-1] == '.') u--;
        if(++ch[u-1] >= '5') st.insert(u-1);
        now = u;
    }
    bool ok = false;
    for(int i = dot-1;i >= 0;i--)
    {
        if(i) ch[i-1] += (ch[i]-'0')/10;
        else if(ch[i] > '9') ok = true;
        ch[i] = (ch[i] - '0')%10+'0';
    }
    if(ok) cout << 1;
    for(int i = 0;i < now;i++)
        cout << ch[i];
    cout << endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=200000+10;
char s[maxn];
int n,t,pos,flag=0,pp;
long long ans=0;
int main()
{
  scanf("%d%d",&n,&t);
  scanf("%s",s+1);
  for(int i=1;i<=n;i++)
    if(s[i]=='.')
    {
	  pos=i;
      break;
    }
  for(int i=pos+1;i<=n;i++)
    if(s[i]>='5')
    {
	  pp=i;
      break;
    }
  if(pp)
  {
	for(int i=pp+1;i<=n;i++) s[i]='0';
    int v=s[pos-1]-'0';
    while(pp>pos&&t)
    {
	  s[pp]='0';
      pp--;if(pp==pos) pp--;
      s[pp]++;t--;
      if(s[pp]<'5') break;
    }
    if(s[pos-1]-'0'>v) flag=1;
  }
  if(flag)
  {
	int t=pos-1,ff=1;s[0]='0';
    while(s[t]>'9')
    {
	  s[t-1]++;
      s[t]='0';
      t--;
    }
    if(s[0]>'0') ff=0;
    for(int i=ff;i<pos;i++) printf("%c",s[i]);
  }
  else
  {
	for(int i=1;i<=n;i++)
      if(s[i]>'0'||i<=pos) printf("%c",s[i]);
  }
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=200000+10;
char s[maxn];
int n,t,pos,flag=0,pp;
long long ans=0;
int main()
{
  scanf("%d%d",&n,&t);
  scanf("%s",s+1);
  for(int i=1;i<=n;i++)
    if(s[i]=='.')
    {
	  pos=i;
      break;
    }
  for(int i=pos+1;i<=n;i++)
    if(s[i]>='5')
    {
	  pp=i;
      break;
    }
  if(pp)
  {
	for(int i=pp+1;i<=n;i++) s[i]='0';
    int v=s[pos-1]-'0';
    while(pp>pos&&t)
    {
	  s[pp]='0';
      pp--;if(pp==pos) pp--;
      s[pp]++;t--;
      if(s[pp]<'5') break;
    }
    if(s[pos-1]-'0'>v) flag=1;
  }
  if(flag)
  {
	int t=pos-1,ff=1;
    while(s[t]>'9')
    {
	  s[t-1]++;
      s[t]='0';
      t--;
    }
    if(s[0]>'0') ff=0;
    for(int i=ff;i<pos;i++) printf("%c",s[i]);
  }
  else
  {
	for(int i=1;i<=n;i++)
      if(s[i]>'0'||i<=pos) printf("%c",s[i]);
  }
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=200000+10;
char s[maxn];
int n,t,pos,flag=0,pp;
long long ans=0;
int main()
{
  scanf("%d%d",&n,&t);
  scanf("%s",s+1);
  for(int i=1;i<=n;i++)
    if(s[i]=='.')
    {
	  pos=i;
      break;
    }
  for(int i=pos+1;i<=n;i++)
    if(s[i]>='5')
    {
	  pp=i;
      break;
    }
  if(pp)
  {
	for(int i=pp+1;i<=n;i++) s[i]='0';
    int v=s[pos-1]-'0';
    while(pp>pos&&t)
    {
	  s[pp]='0';
      pp--;if(pp==pos) pp--;
      s[pp]++;t--;
      if(s[pp]<'5') break;
    }
    if(s[pos-1]-'0'>v) flag=1;
  }
  if(flag)
  {
	int t=pos-1,ff=1;s[0]='0';
    while(s[t]>'9')
    {
	  s[t-1]++;
      s[t]='0';
      t--;
    }
    if(s[0]>'0') ff=0;
    for(int i=ff;i<pos;i++) printf("%c",s[i]);
  }
  else
  {
	int ppp=n;
    while(s[ppp]=='0') ppp--;
    for(int i=1;i<=ppp;i++)
      printf("%c",s[i]);
  }
  return 0;
}


//
//  efim_and_strange_grade.cpp
//
//  Created by Lucca Siaudzionis on 05/10/16.
//
//  Efim and Strange Grade - Codeforces

#include <cstdio>

//----------------------
#define MAXN 200200

int n, t;
int num[MAXN];
//----------------------

int main(){

    int pos = -1;
    scanf("%d %d", &n, &t);

    for(int i = 1;i <= n;i++){

        char c;
        scanf(" %c", &c);

        if(c == '.') pos = i;
        else if(pos == -1) num[i] = c - '0';
        else num[i-1] = c - '0';
    }

    n--;
    int last = n;
    for(int i = pos;i <= n;i++){

        if(num[i] >= 5){

            for(last = i;t > 0 && last >= pos;last--, t--){
                if(num[last] < 5) break;
                num[last-1]++;
            }

            break;
        }

    }

    for(int i = 1;i <= last;i++){
        if(i == pos) printf(".");
        printf("%d", num[i]);
    }
    printf("\n");

    return 0;
}


//
//  efim_and_strange_grade.cpp
//
//  Created by Lucca Siaudzionis on 05/10/16.
//
//  Efim and Strange Grade - Codeforces

#include <cstdio>

//----------------------
#define MAXN 200200

int n, t;
int num[MAXN];
//----------------------

int main(){

    int pos = -1;
    scanf("%d %d", &n, &t);

    for(int i = 1;i <= n;i++){

        char c;
        scanf(" %c", &c);

        if(c == '.') pos = i;
        else if(pos == -1) num[i] = c - '0';
        else num[i-1] = c - '0';
    }

    n--;
    int last = n;
    for(int i = pos;i <= n;i++){

        if(num[i] >= 5){

            for(last = i;t > 0 && last >= pos;last--){
                if(num[last] < 5) break;
                num[last-1]++;
                if(num[last] < 10) t--;
            }

            break;
        }

    }

    for(int i = last;i >= 1;i--)
        if(num[i] > 9) num[i-1]++, num[i] %= 10;

    for(int i = last;i >= 1;i--){
        if(num[i] || i < pos) break;
        last--;
    }

    if(num[0]) printf("%d", num[0]);
    for(int i = 1;i <= last;i++){
        if(i == pos) printf(".");
        printf("%d", num[i]);
    }
    printf("\n");

    return 0;
}


//
//  efim_and_strange_grade.cpp
//
//  Created by Lucca Siaudzionis on 05/10/16.
//
//  Efim and Strange Grade - Codeforces

#include <cstdio>

//----------------------
#define MAXN 200200

int n, t;
int num[MAXN];
//----------------------

int main(){

    int pos = -1;
    scanf("%d %d", &n, &t);

    for(int i = 1;i <= n;i++){

        char c;
        scanf(" %c", &c);

        if(c == '.') pos = i;
        else if(pos == -1) num[i] = c - '0';
        else num[i-1] = c - '0';
    }

    n--;
    int last = n;
    for(int i = pos;i <= n;i++){

        if(num[i] >= 5){

            for(last = i;t > 0 && last >= pos;last--){
                if(num[last] < 5) break;
                num[last-1]++;
                if(num[last] < 10) t--;
            }

            break;
        }

    }

    for(int i = last;i >= 1;i--)
        if(num[i] > 9) num[i-1]++, num[i] %= 10;

    for(int i = last;i >= 1;i--){
        if(num[i] || i < pos) break;
        last--;
    }

    for(int i = 1;i <= last;i++){
        if(i == pos) printf(".");
        printf("%d", num[i]);
    }
    printf("\n");

    return 0;
}


//
//  efim_and_strange_grade.cpp
//
//  Created by Lucca Siaudzionis on 05/10/16.
//
//  Efim and Strange Grade - Codeforces

#include <cstdio>

//----------------------
#define MAXN 20020

int n, t;
int num[MAXN];
//----------------------

int main(){

    int pos = -1;
    scanf("%d %d", &n, &t);

    for(int i = 1;i <= n;i++){

        char c;
        scanf(" %c", &c);

        if(c == '.') pos = i;
        else if(pos == -1) num[i] = c - '0';
        else num[i-1] = c - '0';
    }

    n--;
    int last = n;
    for(int i = pos;i <= n;i++){

        if(num[i] >= 5){

            for(last = i;t > 0 && last >= pos;last--, t--){
                if(num[last] < 5) break;
                num[last-1]++;
            }

            break;
        }

    }

    for(int i = 1;i <= last;i++){
        if(i == pos) printf(".");
        printf("%d", num[i]);
    }
    printf("\n");

    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<queue>
#include<cstring>
#include<string>
#include<stack>
#include<vector>
#include<cstdlib>
#include<algorithm>
using namespace std;
string ss;
int n,t;
int pos0,pos1,time;
int dotpos;

int next(int pos,int tt){
    if(pos>=n) return -1;
//    else if(tt==0) return -2;
    if(ss[pos]<'4'){
    //    cout<<'a'<<endl;
        pos0 = pos;
        //time = tt;
        return 0;
    }else if(ss[pos]>'4'){
      //  cout<<"...."<<endl;
        pos1 = pos;
        time = tt;
        return 1;
    }else {
        return next(pos+1,tt-1);
    }
}

void print(int pp){
    if(ss[pp]=='.'){
        int jw = 1;
        for(int i=pp-1;i>=0;i--){
            if(i!=pp-1){
                jw = (ss[i]-'0'+jw)/10;
            }
            if(i!=0) ss[i] = (ss[i]-'0'+jw)%10+'0';
            else ss[i]=ss[i]+jw;
//            cout<<ss[i]<<endl;
//            printf("%d %d\n",'9',ss[i]);
        }
        for(int i=0;i<pp;i++){
            if(i==0&&ss[i]>'9'){
                cout<<"1";
                ss[i] = (ss[i]-'0')%10+'0';
            }
            cout<<ss[i];
        }
        cout<<endl;
    }else{
        for(int i=0;i<pp;i++){
            cout<<ss[i];
        }
        ss[pp] = ss[pp]+1;
        cout<<ss[pp]<<endl;
    }
}

int main(){
//    cin>>n>>t;
//    cin>>ss;
    while(cin>>n>>t>>ss){
        for(int i=0; i<n;i++){
            if(ss[i]=='.'){
                dotpos = i;
                break;
            }
        }
        int ii = dotpos + 1;
       // t--;
        int temp=next(ii,t-1);
        while(1){
            if(temp==-1) break;
            else if(temp == 1) break;
            else ii = pos0+1;
            temp = next(ii,t-1);
            //cout<<"ii="<<ii<<endl;
        }
    //    cout<<"time="<<time<<endl;
        if(temp == 1){
            if(time<0){
      //          pos1 = pos1 + time;
                  pos1 = pos1 - t;
            }else{
                pos1 = pos1 - (t-time);
            }
//            for(int i=0;i<=pos1;i++){
//                cout<<ss[i];
//            }
//            cout<<endl;

            print(pos1);
        }else {
            cout<<ss<<endl;
        }
    }

}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<queue>
#include<cstring>
#include<string>
#include<stack>
#include<vector>
#include<cstdlib>
#include<algorithm>
using namespace std;
string ss;
int n,t;
int pos0,pos1,time;
int dotpos;

int next(int pos,int tt){
    if(pos>=n) return -1;
//    else if(tt==0) return -2;
    if(ss[pos]<'4'){
    //    cout<<'a'<<endl;
        pos0 = pos;
        //time = tt;
        return 0;
    }else if(ss[pos]>'4'){
      //  cout<<"...."<<endl;
        pos1 = pos;
        time = tt;
        return 1;
    }else {
        return next(pos+1,tt-1);
    }
}

void print(int pp){
    if(ss[pp]=='.'){
        int jw = 1;
        for(int i=pp-1;i>=0;i--){
            int temp = ss[i]-'0'+jw;
            jw = temp/10;
            if(i!=0) ss[i] = temp%10+'0';
            else ss[i]=ss[i]+jw;
//            cout<<ss[i]<<endl;
//            printf("%d %d\n",'9',ss[i]);
        }
        for(int i=0;i<pp;i++){
            if(i==0&&ss[i]>'9'){
                cout<<"1";
                ss[i] = (ss[i]-'0')%10+'0';
            }
            cout<<ss[i];
        }
        cout<<endl;
    }else{
        for(int i=0;i<pp;i++){
            cout<<ss[i];
        }
        ss[pp] = ss[pp]+1;
        cout<<ss[pp]<<endl;
    }
}

int main(){
//    cin>>n>>t;
//    cin>>ss;
    while(cin>>n>>t>>ss){
        for(int i=0; i<n;i++){
            if(ss[i]=='.'){
                dotpos = i;
                break;
            }
        }
        int ii = dotpos + 1;
       // t--;
        int temp=next(ii,t-1);
        while(1){
            if(temp==-1) break;
            else if(temp == 1) break;
            else ii = pos0+1;
            temp = next(ii,t-1);
            //cout<<"ii="<<ii<<endl;
        }
    //    cout<<"time="<<time<<endl;
        if(temp == 1){
            if(time<0){
      //          pos1 = pos1 + time;
                  pos1 = pos1 - t;
            }else{
                pos1 = pos1 - (t-time);
            }
//            for(int i=0;i<=pos1;i++){
//                cout<<ss[i];
//            }
//            cout<<endl;

            print(pos1);
        }else {
            cout<<ss<<endl;
        }
    }

}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<queue>
#include<cstring>
#include<string>
#include<stack>
#include<vector>
#include<cstdlib>
#include<algorithm>
using namespace std;
string ss;
int n,t;
int pos0,pos1,time;
int dotpos;

int next(int pos,int tt){
    if(pos>=n) return -1;
//    else if(tt==0) return -2;
    if(ss[pos]<'4'){
    //    cout<<'a'<<endl;
        pos0 = pos;
        //time = tt;
        return 0;
    }else if(ss[pos]>'4'){
      //  cout<<"...."<<endl;
        pos1 = pos;
        time = tt;
        return 1;
    }else {
        return next(pos+1,tt-1);
    }
}

void print(int pp){
    if(ss[pp]=='.'){
        int jw = 1;
        for(int i=pp-1;i>=0;i--){
            int temp = ss[i]-'0'+jw;
            if(i!=pp-1){
                jw = temp/10;
            }
            if(i!=0) ss[i] = temp%10+'0';
            else ss[i]=ss[i]+jw;
//            cout<<ss[i]<<endl;
//            printf("%d %d\n",'9',ss[i]);
        }
        for(int i=0;i<pp;i++){
            if(i==0&&ss[i]>'9'){
                cout<<"1";
                ss[i] = (ss[i]-'0')%10+'0';
            }
            cout<<ss[i];
        }
        cout<<endl;
    }else{
        for(int i=0;i<pp;i++){
            cout<<ss[i];
        }
        ss[pp] = ss[pp]+1;
        cout<<ss[pp]<<endl;
    }
}

int main(){
//    cin>>n>>t;
//    cin>>ss;
    while(cin>>n>>t>>ss){
        for(int i=0; i<n;i++){
            if(ss[i]=='.'){
                dotpos = i;
                break;
            }
        }
        int ii = dotpos + 1;
       // t--;
        int temp=next(ii,t-1);
        while(1){
            if(temp==-1) break;
            else if(temp == 1) break;
            else ii = pos0+1;
            temp = next(ii,t-1);
            //cout<<"ii="<<ii<<endl;
        }
    //    cout<<"time="<<time<<endl;
        if(temp == 1){
            if(time<0){
      //          pos1 = pos1 + time;
                  pos1 = pos1 - t;
            }else{
                pos1 = pos1 - (t-time);
            }
//            for(int i=0;i<=pos1;i++){
//                cout<<ss[i];
//            }
//            cout<<endl;

            print(pos1);
        }else {
            cout<<ss<<endl;
        }
    }

}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<queue>
#include<cstring>
#include<string>
#include<stack>
#include<vector>
#include<cstdlib>
#include<algorithm>
using namespace std;
string ss;
int n,t;
int pos0,pos1,time;
int dotpos;

int next(int pos,int tt){
    if(pos>=n) return -1;
//    else if(tt==0) return -2;
    if(ss[pos]<'4'){
    //    cout<<'a'<<endl;
        pos0 = pos;
        //time = tt;
        return 0;
    }else if(ss[pos]>'4'){
      //  cout<<"...."<<endl;
        pos1 = pos;
        time = tt;
        return 1;
    }else {
        return next(pos+1,tt-1);
    }
}

void print(int pp){
    if(ss[pp]=='.'){
        int jw = 1;
        for(int i=pp-1;i>=0;i--){
            if(i!=pp-1){
                jw = (ss[i]-'0'+jw)/10;
            }
            ss[i] = (ss[i]-'0'+jw)%10+'0';
        }
        for(int i=0;i<pp;i++){
            if(i==0&&jw==1){
                cout<<"1";
            }
            cout<<ss[i];
        }
        cout<<endl;
    }else{
        for(int i=0;i<pp;i++){
            cout<<ss[i];
        }
        ss[pp] = ss[pp]+1;
        cout<<ss[pp]<<endl;
    }
}

int main(){
//    cin>>n>>t;
//    cin>>ss;
    while(cin>>n>>t>>ss){
        for(int i=0; i<n;i++){
            if(ss[i]=='.'){
                dotpos = i;
                break;
            }
        }
        int ii = dotpos + 1;
       // t--;
        int temp=next(ii,t-1);
        while(1){
            if(temp==-1) break;
            else if(temp == 1) break;
            else ii = pos0+1;
            temp = next(ii,t-1);
            //cout<<"ii="<<ii<<endl;
        }
    //    cout<<"time="<<time<<endl;
        if(temp == 1){
            if(time<0){
      //          pos1 = pos1 + time;
                  pos1 = pos1 - t;
            }else{
                pos1 = pos1 - (t-time);
            }
//            for(int i=0;i<=pos1;i++){
//                cout<<ss[i];
//            }
//            cout<<endl;

            print(pos1);
        }else {
            cout<<ss<<endl;
        }
    }

}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<queue>
#include<cstring>
#include<string>
#include<stack>
#include<vector>
#include<cstdlib>
#include<algorithm>
using namespace std;
string ss;
int n,t;
int pos0,pos1,time;
int dotpos;

int next(int pos,int tt){
    if(pos>=n) return -1;
//    else if(tt==0) return -2;
    if(ss[pos]<'4'){
    //    cout<<'a'<<endl;
        pos0 = pos;
        //time = tt;
        return 0;
    }else if(ss[pos]>'4'){
      //  cout<<"...."<<endl;
        pos1 = pos;
        time = tt;
        return 1;
    }else {
        return next(pos+1,tt-1);
    }
}

void print(int pp){
    if(ss[pp]=='.'){
        int jw = 1;
        for(int i=pp-1;i>=0;i--){
            int temp = ss[i]-'0'+jw;
            jw = temp/10;
            ss[i] = temp%10+'0';
//            cout<<ss[i]<<endl;
//            printf("%d %d\n",'9',ss[i]);
        }
        for(int i=0;i<pp;i++){
            if(i==0&&jw==1){
                cout<<"1";
//                ss[i] = (ss[i]-'0')%10+'0';
            }
            cout<<ss[i];
        }
        cout<<endl;
    }else{
        for(int i=0;i<pp;i++){
            cout<<ss[i];
        }
        ss[pp] = ss[pp]+1;
        cout<<ss[pp]<<endl;
    }
}

int main(){
//    cin>>n>>t;
//    cin>>ss;
    while(cin>>n>>t>>ss){
        for(int i=0; i<n;i++){
            if(ss[i]=='.'){
                dotpos = i;
                break;
            }
        }
        int ii = dotpos + 1;
       // t--;
        int temp=next(ii,t-1);
        while(1){
            if(temp==-1) break;
            else if(temp == 1) break;
            else ii = pos0+1;
            temp = next(ii,t-1);
            //cout<<"ii="<<ii<<endl;
        }
    //    cout<<"time="<<time<<endl;
        if(temp == 1){
            if(time<0){
      //          pos1 = pos1 + time;
                  pos1 = pos1 - t;
            }else{
                pos1 = pos1 - (t-time);
            }
//            for(int i=0;i<=pos1;i++){
//                cout<<ss[i];
//            }
//            cout<<endl;

            print(pos1);
        }else {
            cout<<ss<<endl;
        }
    }

}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const int INF = 99999999;

int n = 0, t = 0, pos = 0, e = 0;
string s = "";
void out()
{
	for (int i = 0; i<e - 1; i++) cout << s[i];
	if (isdigit(s[e - 1])) cout << s[e - 1];
	cout << endl;
	return;
}
int main()
{
	cin >> n >> t >> s;
	e = n + 1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				if (s[e - 1] == '.')
				{
					int ee = e-2;
					s[ee]++;
					while (s[ee] > '9')
					{
						s[ee] = '0';
						s[--ee]++;
					}
					out();
					return 0;
				}
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9') s[--e]++;
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define pb push_back
#define mp make_pair
#define ed cout<<endl;
#define F first
#define S second
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
using namespace std;
const int INF = 99999999;

int n, t, pos, e;
string s;
void out()
{
	for (int i = 0; i<e; i++) cout << s[i];
	cout << endl;
	return ;
}
int main()
{
	cin >> n >> t >> s;
	e = n+1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9')
				{
					e--;
					s[e]++;
					t--;
					if (t <= 0)
					{
						out();
						return 0;
					}
				}
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const int INF = 99999999;

int n=0, t=0, pos=0, e=0;
string s="";
void out()
{
	for (int i = 0; i<e-1; i++) cout << s[i];
	if(isdigit(s[e-1])) cout<<s[e-1];
	cout << endl;
	return ;
}
int main()
{
	cin >> n >> t >> s;
	e = n+1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9') s[--e]++;
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define pb push_back
#define mp make_pair
#define ed cout<<endl;
#define F first
#define S second
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
using namespace std;
const int INF = 99999999;

int n, t, pos, e;
string s;
void out()
{
	for (int i = 0; i<e; i++) cout << s[i];
	//cout << endl;
	return ;
}
int main()
{
	cin >> n >> t >> s;
	e = n+1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9')
				{
					e--;
					s[e]++;
					t--;
					if (t <= 0)
					{
						out();
						return 0;
					}
				}
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const int INF = 99999999;

int n = 0, t = 0, pos = 0, e = 0;
string s = "";
void out()
{
	for (int i = 0; i<e - 1; i++) cout << s[i];
	if (isdigit(s[e - 1])) cout << s[e - 1];
	cout << endl;
	return;
}
int main()
{
	cin >> n >> t >> s;
	e = n + 1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				if (s[e - 1] == '.')
				{
					s[e - 2]++;
					out();
					return 0;
				}
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9') s[--e]++;
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const int INF = 99999999;

int n = 0, t = 0, pos = 0, e = 0;
string s = "";
void out()
{
	for (int i = 0; i<e - 1; i++) cout << s[i];
	if (isdigit(s[e - 1])) cout << s[e - 1];
	cout << endl;
	return;
}
int main()
{
	cin >> n >> t >> s;
	e = n + 1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				if (s[e - 1] == '.')
				{
					int ee = e-2;
					s[ee]++;
					while (s[ee] > '9')
					{
						s[ee] = '0';
						if (ee == 0)
						{
							s.insert(0,"1");
							break;
						}
						s[--ee]++;
					}
					out();
					return 0;
				}
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9') s[--e]++;
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const int INF = 99999999;

int n=0, t=0, pos=0, e=0;
string s="";
void out()
{
	for (int i = 0; i<e-1; i++) cout << s[i];
	if(isdigit(s[e])) cout<<s[e];
	cout << endl;
	return ;
}
int main()
{
	cin >> n >> t >> s;
	e = n+1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9') s[--e]++;
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const int INF = 99999999;

int n = 0, t = 0, pos = 0, e = 0;
string s = "";
void out()
{
	for (int i = 0; i<e - 1; i++) cout << s[i];
	if (isdigit(s[e - 1])) cout << s[e - 1];
	cout << endl;
	return;
}
int main()
{
	cin >> n >> t >> s;
	e = n + 1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				while (s[e - 1] == '4')
				{
					s[e - 1]++;
					t--;
					if (!t)
					{
						out();
						return 0;
					}
					e--;
				}
				if (s[e - 1] == '.')
				{
					int ee = e - 2;
					s[ee]++;
					while (s[ee] > '9')
					{
						s[ee] = '0';
						if (ee == 0)
						{
							s.insert(0, "1");
							break;
						}
						s[--ee]++;
					}
					out();
					return 0;
				}
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9') s[--e]++;
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const int INF = 99999999;

int n = 0, t = 0, pos = 0, e = 0;
string s = "";
void out()
{
	for (int i = 0; i<e - 1; i++) cout << s[i];
	if (isdigit(s[e - 1])) cout << s[e - 1];
	cout << endl;
	return;
}
int main()
{
	cin >> n >> t >> s;
	e = n + 1;
	for (int i = 0; i<n; i++)
	{
		if (s[i] == '.')
		{
			pos = i;
			break;
		}
	}
	while (t)
	{
		bool d = 0;
		for (int i = pos + 1; i<e; i++)
		{
			if (s[i] >= '5')
			{
				d = 1;
				e = i;
				while (s[e - 1] == '4')
				{
					s[e - 1]++;
					t--;
					e--;
					if (!t)
					{
						out();
						return 0;
					}
				}
				if (s[e - 1] == '.')
				{
					int ee = e-2;
					s[ee]++;
					while (s[ee] > '9')
					{
						s[ee] = '0';
						if (ee == 0)
						{
							s.insert(0,"1");
							break;
						}
						s[--ee]++;
					}
					out();
					return 0;
				}
				s[e - 1] += 1;
				t--;
				if (t <= 0)
				{
					out();
					return 0;
				}
				while (s[e]>'9') s[--e]++;
				break;
			}
		}
		if (!d) break;
	}
	out();
	return 0;
}


#include <iostream>
#include <string>
using namespace std;

int N,t;
string s;

int main()
{
	cin >> N >> t;
	cin >> s;
	bool roundup = 0;
	int cut = s.size();
	int i;
	for(i=s.size()-1;s[i]!='.';i--)
	{
		if(roundup)
		{
			if(s[i]=='9') s[i] = '0';
			else
			{
				s[i] = (char)(s[i]+1);
				roundup = 0;
			}
		}
		if(s[i] >= '5' && t)
		{
			cut = i;
			roundup = 1;
			t--;
		}
	}
	for(i--;i>=0;i--)
	{
		if(roundup)
		{
			if(s[i]=='9') s[i] = '0';
			else
			{
				s[i] = (char)(s[i]+1);
				roundup = 0;
			}
		}
	}
	if(roundup) cout << 1;
	for(;s[cut-1]=='0';cut--)
		;
	if(s[cut-1]=='.') cut--;
	for(i=0;i<cut;i++)
		cout << s[i];
	cout << '\n';
}