#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e5+10,M=1e6+10,mod=1e9+7,inf=1e9+10;
char a[N];
char ans[N];
int main()
{
    int x,i,t;
    scanf("%s",a);
    x=strlen(a);
    for(i=0;i<x;i++)
    if(a[i]=='.')
    break;
    for(t=0;t<x;t++)
    if(a[t]!='0'&&a[t]!='.')
    break;
    int  wei=(-t+i);
    if(i==x)
    wei--;
    for(i=0;i<x;i++)
    if(a[i]!='0'&&a[i]!='.')
    break;
    int st=i;
    for(t=x-1;t>=0;t--)
    if(a[t]!='0'&&a[t]!='.')
    break;
    int en=t;

    if(st>en)
    printf("0\n");
    else
    {
        printf("%c",a[st]);
        if(en>=st+1&&a[st+1]!='.')
        printf(".");
        for(i=st+1;i<=en;i++)
        printf("%c",a[i]);
        if(wei!=0)
        printf("E%d",wei);
        printf("\n");
    }
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e5+10,M=1e6+10,mod=1e9+7,inf=1e9+10;
char a[N];
char ans[N];
int main()
{
    int x,i,t;
    scanf("%s",a);
    x=strlen(a);
    for(i=0;i<x;i++)
    if(a[i]=='.')
    break;
    for(t=0;t<x;t++)
    if(a[t]!='0'&&a[t]!='.')
    break;
    int  wei=(-t+i);
    if(i>t)
    wei--;
    for(i=0;i<x;i++)
    if(a[i]!='0'&&a[i]!='.')
    break;
    int st=i;
    for(t=x-1;t>=0;t--)
    if(a[t]!='0'&&a[t]!='.')
    break;
    int en=t;

    if(st>en)
    printf("0\n");
    else
    {
        printf("%c",a[st]);
        if(en>=st+1&&a[st+1]!='.')
        printf(".");
        for(i=st+1;i<=en;i++)
        printf("%c",a[i]);
        if(wei!=0)
        printf("E%d",wei);
        printf("\n");
    }
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e5+10,M=1e6+10,mod=1e9+7,inf=1e9+10;
char a[N];
char ans[N];
int main()
{
    int x,i,t;
    scanf("%s",a);
    x=strlen(a);
    for(i=0;i<x;i++)
    if(a[i]=='.')
    break;
    a[i]='.';
    if(i==x)
    x+=1,a[x]=0;
    for(i=0;i<x;i++)
    if(a[i]!='0')
    break;
    int st=i;
    for(t=x-1;t>=0;t--)
    if(a[t]!='0')
    break;
    int en=t;
    if(st>en)
    printf("0\n");
    if(st==en&&a[st]=='.')
    printf("0\n");
    else
    {
        for(i=st;i<=en;i++)
        if(a[i]=='.')
        break;
        a[i]='.';
        int wei=i-st-1;
        int ji=0;
        for(t=st;t<=en;t++)
        if(t!=i)
        ans[ji++]=a[t];
        for(t=ji-1;t>=0;t--)
        if(ans[t]!='0')
        break;
        printf("%c",ans[0]);
        if(t>=1)
        printf(".");
        for(i=1;i<=t;i++)
        printf("%c",ans[i]);
        if(wei!=0)
        printf("E%d",wei);
        printf("\n");
    }
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e5+10,M=1e6+10,mod=1e9+7,inf=1e9+10;
char a[N];
char ans[N];
int main()
{
    int x,i,t;
    scanf("%s",a);
    x=strlen(a);
    for(i=0;i<x;i++)
    if(a[i]!='0')
    break;
    int st=i;
    for(t=x-1;t>=0;t--)
    if(a[t]!='0')
    break;
    int en=t;
    if(st>=en)
    printf("0\n");
    else
    {
        for(i=st;i<=en;i++)
        if(a[i]=='.')
        break;
        a[i]='.';
        int wei=i-st-1;
        int ji=0;
        for(t=st;t<=en;t++)
        if(t!=i)
        ans[ji++]=a[t];
        for(t=ji-1;t>=0;t--)
        if(ans[t]!='0')
        break;
        printf("%c",ans[0]);
        if(t>=1)
        printf(".");
        for(i=1;i<=t;i++)
        printf("%c",ans[i]);
        if(wei!=0)
        printf("E%d",wei);
        printf("\n");
    }
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e5+10,M=1e6+10,mod=1e9+7,inf=1e9+10;
char a[N];
char ans[N];
int main()
{
    int x,i,t;
    scanf("%s",a);
    x=strlen(a);
    for(i=0;i<x;i++)
    if(a[i]!='0')
    break;
    int st=i;
    for(t=x-1;t>=0;t--)
    if(a[t]!='0')
    break;
    int en=t;
    if(st>=en)
    printf("0\n");
    else
    {
        for(i=st;i<=en;i++)
        if(a[i]=='.')
        break;
        a[i]='.';
        int wei=i-st-1;
        int ji=0;
        for(t=st;t<=en;t++)
        if(t!=i)
        ans[ji++]=a[t];
        for(t=ji-1;t>=0;t--)
        if(ans[t]!='0')
        break;
        printf("%c",ans[0]);
        if(t>1)
        printf(".");
        for(i=1;i<t;i++)
        printf("%c",ans[i]);
        if(wei!=0)
        printf("E%d",wei);
        printf("\n");
    }
	return 0;
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

void test(){
	REP(i,0,sz(q))cout<<q[i];
	cout<<endl;
}
int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	if(sz(q)==2){
		if(q[0] == '.'){
			cout<<q[1]<<"E-1";		return 0;
		}
	}
	if(sz(q)==1){
		cout<<q[0];
		if(last!=0){
			cout<<"E"<<last;
		}
		return 0;

	}
	bool fir = 1;
	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

void test(){
	REP(i,0,sz(q))cout<<q[i];
	cout<<endl;
}
int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	if(sz(q)==2){
		if(q[0] == '.'){
			cout<<q[1]<<"E-1";		return 0;
		}
	}
	if(sz(q)==1){
		cout<<q[0];
		if(last!=0){
			cout<<"E"<<last;
		}
		return 0;

	}
	bool fir = 1;
	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				if(q[i]='0')continue;
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

void test(){
	REP(i,0,sz(q))cout<<q[i];
	cout<<endl;
}
int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	if(sz(q)==2){
		if(q[0] == '.'){
			cout<<q[1]<<"E-1";		return 0;
		}
	}
	if(sz(q)==1){
		cout<<q[0];
		if(last!=0){
			cout<<"E"<<last;
		}
		return 0;

	}
	bool fir = 1;
	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				if(q[i]=='0')continue;
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

void test(){
	REP(i,0,sz(q))cout<<q[i];
	cout<<endl;
}
int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	while(q.front() == '0' || q.front()=='.')q.pop_front();
	if(sz(q)==1){
		cout<<q[0];
		if(last!=0){
			cout<<"E"<<last;
		}
		return 0;
	}
	bool fir = 1;

	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

void test(){
	REP(i,0,sz(q))cout<<q[i];
	cout<<endl;
}
int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	while(q.front() == '0' || q.front()=='.')q.pop_front();

	if(sz(q)==2){
		if(q[0] == '.'){
			cout<<q[1]<<"E-1";		return 0;
		}
	}

	if(sz(q)==1){
		cout<<q[0];
		if(last!=0){
			cout<<"E"<<last;
		}
		return 0;
	}
	bool fir = 1;
	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				if(q[i]=='0')continue;
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	if(q[0] == '.'){
		cout<<q[1]<<"E-1";		return 0;

	}else if(q[1] =='.'){
		cout<<q[0];
				return 0;

	}
	bool fir = 1;
	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

void test(){
	REP(i,0,sz(q))cout<<q[i];
	cout<<endl;
}
int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		REP(i,1,sz(q)){
			last++;
			if(q[i]!='0'){
				break;
			}
		}
		last = -last;
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	while(q.front() == '0' || q.front()=='.')q.pop_front();
	if(sz(q)==1){
		cout<<q[0];
		if(last!=0){
			cout<<"E"<<last;
		}
		return 0;
	}
	bool fir = 1;

	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

void test(){
	REP(i,0,sz(q))cout<<q[i];
	cout<<endl;
}
int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	while(q.back() == '.' || q.back() =='0')q.pop_back();
	if(sz(q)==2)
	if(q[0] == '.'){
		cout<<q[1]<<"E-1";		return 0;

	}else if(q[1] =='.'){
		cout<<q[0];
				return 0;

	}
	bool fir = 1;
	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define in(x) (read(x))
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = l;x<u;x++)
#define RREP(x,l,u) for(ll x = l;x>=u;x--)
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define mst(x,a) memset(x,a,sizeof(x))
#define all(a) a.begin(),a.end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define sqr(x) ((x)*(x))
#define lowbit(x) (x&(-x))
#define lson (ind<<1)
#define rson (ind<<1|1)
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;
const int block_size = 320;
typedef complex<ll> point;
const ll mod = 1e9+7;
const ld eps = 1e-9;
const int inf = mod;
template<typename T>
inline int sign(const T&a){if(a<0)return -1;if(a>0)return 1;return 0;}

template<typename T> inline void read(T &x){
    x = 0; T f = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
    while (isdigit(ch))  {x = x * 10 + ch - '0'; ch = getchar();}
    x *= f;
}

deque<char>q;

int main(){
	char c = getchar();
	while(c!='\n'){
		q.PB(c);c = getchar();
	}

	while(!q.empty() && q.front() == '0'){
		q.pop_front();
	}1
	while(!q.empty() && q.back() == '0'){
		q.pop_back();
	}
	bool hasdecimal = 0;
	REP(i,0,sz(q)){
		if(q[i] == '.')hasdecimal = 1;
	}
	if(!hasdecimal){
		q.PB('.');
	}
	int last = 0;
	if(q.front() == '.'){
		last = -(sz(q)-1);
	}else{
		REP(i,1,sz(q)){
			if(q[i]=='.')break;else last++;
		}
	}
	if(sz(q)==2){
		cout<<q[0];return 0;
	}
	bool fir = 1;
	REP(i,0,sz(q)){
		if(isdigit(q[i])){
			if(fir){
				cout<<q[i]<<'.';
				fir = 0;
			}else{
				cout<<q[i];
			}
		}
	}
	if(last!=0){
		cout<<"E"<<last;
	}
}


#include<bits/stdc++.h>
using namespace std;
vector<vector<int>> adj(1000000);
int visited[1000000],ans[1000000],a[1000000];
vector <int > q(1000000);
vector <int > r(1000000);
void dfs(int v)
{
  visited[v]=true;
  q.push_back(v);
  r.push_back(a[v]);
 for (int i=0; i<adj[v].size();++i)
    if (visited[adj[v][i]]==false)
      dfs(adj[v][i]);
}
int  main()
{ios::sync_with_stdio(false);
   cin.tie(0);
   cout.tie(0);

    int n,m;
    cin>>n>>m;

    for(int i=1;i<=n;i++)
    cin>>a[i];

    for(int i=0;i<m;i++)
    {
        int u,v;
        cin>>u>>v;
         adj[u].push_back(v);
         adj[v].push_back(u);
    }
     for(int i=1;i<=n;i++)
     {
         if(visited[i]==false)
         {
             q.clear();
             r.clear();
             dfs(i);
             sort(q.begin(),q.end());
             sort(r.rbegin(),r.rend());
             for(int i=0;i<q.size();i++)
             ans[q[i]]=r[i];

         }
     }
     for(int i=1;i<=n;i++)
     if(ans[i]==0)
     ans[i]=a[i];

     for(int i=1;i<=n;i++)
     cout<<ans[i]<<" ";

    return 0;
}


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

string str;
bool found = false;
int perpos = -1, numpos;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);

    cin >> str;

    for (int i = 0; i < str.length(); i++){
            if (str[i] == '0'){
                str = str.substr(1);
                i--;
            } else{
                break;
            }
    }

    if (str.length() == 1) {
        cout << str << endl;
        return 0;
    }

    for (int i = 0; i < str.length(); i++){
        if (str[i] != '.' && str[i]-'0' != 0 && !found) {
            numpos = i;
            found = true;
            if (str[i+1] == '.') {

                if (count(str.begin(), str.end(), '0') == str.length()-2){
                    cout << str[0] << endl;
                    return 0;
                }

                ///Remove 0s at back
                for (int j = str.length()-1; j >= 0; j--){
                    if (str[j] != '0') break;
                    if (str[j] == '0') str = str.substr(0, str.length()-1);

                }

                cout << str[i] << str.substr(1) << endl;
                return 0;
            }
        }

        if (str[i] == '.') perpos = i;
        if (perpos && numpos) break;
    }

    str.erase(remove(str.begin(), str.end(), '.'), str.end());

    if (perpos == -1) perpos = str.length();

    for (int i = str.length()-1; i >= 0; i--){
        if (str[i] != '0') break;
        if (str[i] == '0') str = str.substr(0, str.length()-1);
    }

    if (str.length() == 1){
        cout << str[0] << 'E';
        cout << (perpos < numpos ? (perpos-numpos) : (perpos-numpos-1)) << endl;
    } else{
        if (perpos < numpos) numpos--;
        cout << str[numpos];
         if (numpos != str.length()-1) cout << ".";
         cout << str.substr(numpos+1) << "E";
        if (perpos < numpos) numpos++;
        cout << (perpos < numpos ? perpos-numpos : perpos-numpos-1) << endl;
    }

    return 0;
}


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

string str;
bool found = false;
int perpos = -1, numpos;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);

    cin >> str;

    str.erase(0, min(str.find_first_not_of('0'), str.length()-1));

    if (str.length() == 1) {
        cout << str << endl;
        return 0;
    }

    int perpos = str.find_first_of('.');
    int numpos = str.find_first_of("123456789");

    if (perpos - numpos == 1){
        if (count(str.begin(), str.end(), '0') == str.length()-2){
            cout << str[0] << endl;
        } else{
            for (int i = str.length()-1; i >= 0; i--){
                if (str[i] != '0') break;
                if (str[i] == '0') str = str.substr(0, str.length()-1);
            }
            cout << str << endl;
        }
        return 0;
    }

    if (perpos != -1) str.erase(str.begin()+perpos);
    if (perpos == -1) perpos = str.length();

    for (int i = str.length()-1; i >= 0; i--){
        if (str[i] != '0') break;
        if (str[i] == '0') str = str.substr(0, str.length()-1);
    }
    if (str.length() == 1){
        cout << str[0] << 'E';
        cout << (perpos < numpos ? (perpos-numpos) : (perpos-numpos-1)) << endl;
    } else{
        if (perpos < numpos) numpos--;
        cout << str[numpos];
        if (numpos != str.length()-1) cout << ".";
        cout << str.substr(numpos+1) << "E";
        if (perpos < numpos) numpos++;
        cout << (perpos < numpos ? perpos-numpos : perpos-numpos-1) << endl;
    }

    return 0;
}


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

string str;
bool found = false;
int perpos = -1, numpos;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);

    cin >> str;

    for (int i = 0; i < str.length(); i++){
            if (str[i] == '0'){
                str = str.substr(1);
                i--;
            } else{
                break;
            }
    }

    if (str.length() == 1) {
        cout << str << endl;
        return 0;
    }

    for (int i = 0; i < str.length(); i++){
        if (str[i] != '.' && str[i]-'0' != 0 && !found) {
            numpos = i;
            found = true;
            if (str[i+1] == '.') {
                for (int j = str.length()-1; j >= 0; j--){
                    if (str[j] != '0') break;
                    if (str[j] == '0') str = str.substr(0, str.length()-1);

                }

                cout << str[i] << str.substr(1) << endl;
                return 0;
            }
        }

        if (str[i] == '.') perpos = i;
        if (perpos && numpos) break;
    }

    str.erase(remove(str.begin(), str.end(), '.'), str.end());

    if (perpos == -1) perpos = str.length();

    for (int i = str.length()-1; i >= 0; i--){
        if (str[i] != '0') break;
        if (str[i] == '0') str = str.substr(0, str.length()-1);
    }

    if (str.length() == 1){
        cout << str[0] << 'E';
        cout << (perpos < numpos ? (perpos-numpos) : (perpos-numpos-1)) << endl;
    } else{
        if (perpos < numpos) numpos--;
        cout << str[numpos];
         if (numpos != str.length()-1) cout << ".";
         cout << str.substr(numpos+1) << "E";
        if (perpos < numpos) numpos++;
        cout << (perpos < numpos ? perpos-numpos : perpos-numpos-1) << endl;
    }

    return 0;
}


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

string str;
bool found = false;
int perpos = -1, numpos;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);

    cin >> str;

    str.erase(0, min(str.find_first_not_of('0'), str.length()-1));

    if (str.length() == 1) {
        cout << str << endl;
        return 0;
    }

    for (int i = 0; i < str.length(); i++){
        if (str[i] != '.' && str[i]-'0' != 0 && !found) {
            numpos = i;
            found = true;
            if (str[i+1] == '.') {

                if (count(str.begin(), str.end(), '0') == str.length()-2){
                    cout << str[0] << endl;
                    return 0;
                }

                ///Remove 0s at back
                for (int j = str.length()-1; j >= 0; j--){
                    if (str[j] != '0') break;
                    if (str[j] == '0') str = str.substr(0, str.length()-1);

                }

                cout << str[i] << str.substr(1) << endl;
                return 0;
            }
        }

        if (str[i] == '.') perpos = i;
        if (perpos && numpos) break;
    }

    str.erase(remove(str.begin(), str.end(), '.'), str.end());

    if (perpos == -1) perpos = str.length();

    for (int i = str.length()-1; i >= 0; i--){
        if (str[i] != '0') break;
        if (str[i] == '0') str = str.substr(0, str.length()-1);
    }

    if (str.length() == 1){
        cout << str[0] << 'E';
        cout << (perpos < numpos ? (perpos-numpos) : (perpos-numpos-1)) << endl;
    } else{
        if (perpos < numpos) numpos--;
        cout << str[numpos];
         if (numpos != str.length()-1) cout << ".";
         cout << str.substr(numpos+1) << "E";
        if (perpos < numpos) numpos++;
        cout << (perpos < numpos ? perpos-numpos : perpos-numpos-1) << endl;
    }

    return 0;
}


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
	<ActiveTarget name="Debug" />
	<File name="main.cpp" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
		<Cursor>
			<Cursor1 position="1381" topLine="16" />
		</Cursor>
	</File>
</CodeBlocks_layout_file>


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

string str;
bool found = false;
int perpos = -1, numpos;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);

    cin >> str;

    str.erase(0, min(str.find_first_not_of('0'), str.length()-1));

    if (str.length() == 1) {
        cout << str << endl;
        return 0;
    }

    int perpos = str.find_first_of('.');
    int numpos = str.find_first_of("123456789");

    if (perpos - numpos == 1){
        if (count(str.begin(), str.end(), '0') == str.length()-2){
            cout << str[0] << endl;
        } else{
            int i;
            for (i = str.length()-1; i >= 0; i--){
                if (str[i] != '0') break;
            }
            str = str.substr(0, i+1);
            cout << str << endl;
        }
        return 0;
    }

    if (perpos != -1) str.erase(str.begin()+perpos);
    if (perpos == -1) perpos = str.length();

    int i;
    for (i = str.length()-1; i >= 0; i--){
        if (str[i] != '0') break;
    }

    str = str.substr(0, i+1);
    if (str.length() == 1){
        cout << str[0] << 'E';
        cout << (perpos < numpos ? (perpos-numpos) : (perpos-numpos-1)) << endl;
    } else{
        if (perpos < numpos) numpos--;
        cout << str[numpos];

        if (numpos != str.length()-1) cout << ".";
        cout << str.substr(numpos+1) << "E";

        if (perpos < numpos) numpos++;
        cout << (perpos < numpos ? perpos-numpos : perpos-numpos-1) << endl;
    }

    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
#include <queue>
using namespace std;

char c[500];
int l,pound=0,left=0,right,num[500],pound_id;
int len_num;

int read(){
	int t=1,s=0;
	char c=getchar();
	while((c>'9'||c<'0')&&c!='-')c=getchar();
	if(c=='-')t=-1,c=getchar();
	while(c>='0'&&c<='9')
	s=s*10+c-'0',c=getchar();
	return s*t;
}

void work_no_pound(){
	int need_pound=0;
	printf("%d",num[1]);
	for(int i=2;i<=len_num;i++)
	if(num[i]!=0){
		need_pound=1;
		break;
	}
	if(need_pound==1){
		printf(".");
		for(int i=2;i<=len_num;i++)
		printf("%d",num[i]);
	}
	if(len_num>1)
	printf("E%d",len_num-1);
}

void work_after_one_pound(){
	printf("%d.",num[1]);
	for(int i=2;i<=len_num;i++){
		if(num[i]!=-1)printf("%d",num[i]);
	}
	if(pound_id>2)
	printf("E%d",pound_id-2);
}

void work_first_zero_one_pound(){
	int first_id;
	for(int i=1;i<=len_num;i++)
	if(num[i]!=0&&num[i]!=-1){
		printf("%d",num[i]);
		first_id=i;
		break;
	}
	if(first_id!=len_num){
		printf(".");
		for(int j=first_id+1;j<=len_num;j++)
		if(num[j]!=-1)printf("%d",num[j]);
	}
	printf("E%d",2-first_id);
}

int main(void){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	scanf("%s",c);
	l=strlen(c);
	right=l-1;
	for(int i=0;i<l;i++)
	if(c[i]=='.')pound=1;
	for(int i=0;i<l;i++){
		if(c[i]=='0'&&c[i+1]!='.')left++;
		if(c[i]=='.'||(c[i]>'0'&&c[i]<='9'))
		break;
	}
	if(pound==1){
		for(int i=l-1;i>=0;i--){
			if(c[i]>'0'&&c[i]<='9')break;
			if(c[i]=='.'){
				pound=0;
				right--;
				break;
			}
			if(c[i]=='0')right--;
			if(c[i-1]=='.'){
				pound=0;
				right--;
				break;
			}

		}
	}
	if(c[0]=='.')
	num[++len_num]=0;
	for(int i=left;i<=right;i++){
		if(c[i]=='.')
		num[++len_num]=-1,pound_id=len_num;
		if(c[i]>='0'&&c[i]<='9')
		num[++len_num]=c[i]-'0';
	}
	if(pound==0){
		work_no_pound();
		return 0;
	}
	if(pound==1&&num[1]!=0){
		work_after_one_pound();
		return 0;
	}
	if(pound==1&&num[1]==0){
		work_first_zero_one_pound();
		return 0;
	}
}


#include<bits/stdc++.h>
using namespace std;
char s[1000005];
char a;
int len,cnt,l,r,p,k;
int main(){
	while(cin.peek()!='\n'){
		len++;
		cin>>s[len];
	}
	l=1;r=len;
	for(int i=l;i<=r;i++)
	if(s[i]=='.'){
		p=i;
		break;
	}
	if(p==0){
		r++;
		s[r]='.';
		p=r;
	}
	for(int i=1;i<=len;i++){
		if(s[i]=='0')l=i+1;
        else break;
	}
	for(int i=len;i>=1;i--){
		if(s[i]=='0')r=i-1;
		else break;
	}
    if(p==l){
    	while(s[p]>'9'||s[p]<'1')p++;
    	cout<<s[p];
    	if(r>=p+1)cout<<'.';
    	for(int i=p+1;i<=r;i++)cout<<s[i];
    	cout<<'E'<<l-p<<endl;
	}
	else if(p==l+1){
		cout<<s[l];
		if(r-l>=2)cout<<'.';
		for(int i=l+2;i<=r;i++)cout<<s[i];
		cout<<endl;
	}
	else {
		cout<<s[l];
		k=r;
		for(int i=r;i>=l+1;i--){
			if(s[i]=='.')continue;
			else if(s[i]=='0')k=i-1;
			else break;
		}
		if(k!=l)cout<<'.';
		for(int i=l+1;i<=k;i++)if(s[i]!='.')cout<<s[i];
		cout<<'E'<<p-l-1<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
char a,num[1000006];
int main(){
	int flag=0,xl=0,xr=0,tmp=0;
	while(cin>>a){
		if(a=='f') break;
		if(flag==0&&a=='0') continue;
		if(flag==0) flag=1;
		if(a=='.'){
			flag=-1;
			continue;
		}
//		cout<<flag<<endl;
		num[++tmp]=a;
		if(flag==1) xl++;
		else xr++;
	//	cout<<xr<<endl;
	}
//	for(int i=1;i<=tmp;i++) cout<<num[i];
//cout<<num[tmp]<<" "<<(num[tmp]==0)<<" "<<(xr>0)<<endl;
	while(num[tmp]=='0'&&xr>0) tmp--,xr--;
	if(xl==1){
		if(xr==0){
			cout<<num[1];
			return 0;
		}
		cout<<num[1]<<'.';
		for(int i=2;i<=tmp;i++) cout<<num[i];
		return 0;
	}
	else if(xr==0&&xl!=1){
		while(num[tmp]=='0') tmp--;
		if(tmp==1){
			cout<<num[1]<<"E"<<xl-1;
			return 0;
		}
		cout<<num[1]<<'.';
		for(int i=2;i<=tmp;i++) cout<<num[i];
		cout<<"E"<<xl-1;
		return 0;
	}
	else if(xl==0){
		int qdl=1;
		while(num[qdl]=='0') qdl++;
		if(qdl==tmp){
			cout<<num[qdl]<<"E-"<<qdl;
			return 0;
		}
		cout<<num[qdl]<<'.';
		for(int i=qdl+1;i<=tmp;i++) cout<<num[i];
		cout<<"E-"<<qdl;
		return 0;
	}
	else {
		cout<<num[1]<<'.';
		for(int i=2;i<=tmp;i++) cout<<num[i];
		cout<<"E"<<xl-1;
		return 0;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
char c[11];
int i,j,sum,jc,sum1,sum2,len,k,b1[11],b[11],b2[101],b3[11],kk1,kk2,now,summ;
double ans;
int main(){
cin>>c;
jc=-1;
for (i=0; i<strlen(c); i++) if (c[i]=='.') {jc=i; break;}
for (i=0; i<=jc-1; i++) sum1=sum1*10+c[i]-48;
for (i=jc+1; i<strlen(c); i++) sum2=sum2*10+c[i]-48;
if (sum1==0 && sum2==0) {cout<<0; return 0;}
sum1=sum2=0;

if (jc==-1 || jc==strlen(c)-1){
sum=0;
if (jc==-1) len=strlen(c); else len=strlen(c)-1;
for (i=0; i<len; i++) sum=sum*10+c[i]-48;
ans=sum*1.0;
for (i=1; i<=floor(log10(sum)); i++)
ans=ans/10;
k=0;
summ=sum;
while (summ>0){
k++;
b[k]=summ%10;
summ=summ/10;
}
now=1;
while (b[now]==0) now++;
k=k-now;
if (floor(ans)==ans){
printf("%.0lf",ans);
cout<<"E"<<floor(log10(sum))<<endl;
return 0;
}
else{
if (k==1) printf("%.1lf",ans);
if (k==2) printf("%.2lf",ans);
if (k==3) printf("%.3lf",ans);
if (k==4) printf("%.4lf",ans);
if (k==5) printf("%.5lf",ans);
if (k==6) printf("%.6lf",ans);
cout<<"E"<<floor(log10(sum))<<endl;
return 0;}
}

k=0;
sum1=0;
for (i=0; i<=jc-1; i++) sum1=sum1*10+c[i]-48;
sum=sum1;
if (sum1==0) {k=1; b1[k]=0;}
else while (sum1>0){
k++;
b1[k]=sum1%10;
sum1=sum1/10;
}
for (i=1; i<=k; i++) b[k-i+1]=b1[i];
for (i=1; i<=k; i++) b1[i]=b[i];
kk1=k;
k=0;
for (i=jc+1; i<strlen(c); i++) {k++; b2[k]=c[i]-48;}
while (b2[k]==0 && k>0) k--;
kk2=k;

if (k==0){
ans=sum;
for (i=1; i<=floor(log10(sum)); i++)
ans=ans/10;
if (floor(ans)==ans){
printf("%.0lf",ans);
cout<<"E"<<floor(log10(sum))<<endl;
}
else{
if (floor(log10(sum))==1) printf("%.1lf",ans);
if (floor(log10(sum))==2) printf("%.2lf",ans);
if (floor(log10(sum))==3) printf("%.3lf",ans);
if (floor(log10(sum))==4) printf("%.4lf",ans);
if (floor(log10(sum))==5) printf("%.5lf",ans);
if (floor(log10(sum))==6) printf("%.6lf",ans);
cout<<"E"<<floor(log10(sum))<<endl;
return 0;} }
//for (i=1; i<kk1; i++) printf("%d ",b1[i]); printf("%d\n",b1[kk1]);
//for (i=1; i<kk2; i++) printf("%d ",b2[i]); printf("%d\n",b2[kk2]);
if (b1[1]!=0){
cout<<b1[1]<<".";
for (i=2; i<=kk1; i++) cout<<b1[i];
for (i=1; i<=kk2; i++) cout<<b2[i];
if (kk1!=1) cout<<"E"<<kk1-1;
return 0;
}
else{
k=1;
while (b2[k]==0) k++;
now=k;
cout<<b2[k];
k++;
if (k<=kk2) cout<<".";
for (i=k; i<=kk2; i++) cout<<b2[i];
cout<<"E-"<<now<<endl;
return 0;
}

return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int f=0;
	bool v=false;
	if(s[0]=='-')
		cout<<"-";
	int n=s.size();
	for(int i=0;i<s.size();i++)
	{
		if(s[i]=='0'||s[i]=='-')
			f++;
		else
			break;
	}
	bool d=true;
	for(int i=0;i<s.size()-1;i++)
		if(s[i]=='.')
			d=false;
	if(d==false)
	for(int i=s.size()-1;i>=0;i--)
	{
		if(s[i]=='0')
			n--;
		else
			break;
	}
	n--;
	if(s[n]=='.')
		n--;
	if(s[f]=='.')
		f++;
	int hh=100000001;
	for(int i=f;i<=n;i++)
		if(s[i]=='.')
			hh=i;
	if(hh==100000001)
		hh=n;
	cout<<s[f];
	cout<<".";
	int h=n;
	for(int i=n;i>=f;i--)
		if(s[i]=='0')
			h--;
	for(int i=f+1;i<=h;i++)
		if(s[i]!='.')
			cout<<s[i];
	cout<<"E";
	cout<<hh-f<<endl;
}


#include <bits/stdc++.h>
using namespace std;
string z;
int main() {
	cin >> z;
	int dot = z.size();
	for (int i = 0; i < z.size(); i++) {
		if(z[i] == '.') {
			dot = i;
			z = z.substr(0,i) + z.substr(i+1);
		}
	}
	while(z.size() && z.back() == 0) z.pop_back();
	if(z.empty()) {
		exit(1);
	}
	int i = 0;while(z[i] == '0') i++;
	z = z.substr(i);
	dot-=i;
	cout << z[0];
	if(z.size() > 1) cout << '.' << z.substr(i);
	else if(i != 1) cout << "E" << dot-1 << endl;
	return 0;
}


#include <bits/stdc++.h>
#define ri register int
using namespace std;
const int K=2;
template<typename T>inline void Read(T &t){
	int c=getchar(),f=0;
	for(;c<'0'||c>'9';c=getchar())f=(c=='-');
	for(t=0;c>='0'&&c<='9';c=getchar())t=(t<<3)+(t<<1)+(c^48);
	if(f)t=-t;
}
inline void read(double &r){
	double x=0,t=0;
	int s=0,f=1;
	char c=getchar();
	for(;!isdigit(c);c=getchar()){
		if(c=='-')f=-1;
		if(c=='.')goto readt;
	}
	for(;isdigit(c)&&c!='.';c=getchar())x=x*10+c-'0';
	readt:for(;c=='.';c=getchar());
	for(;isdigit(c);c=getchar())t=t*10+c-'0',++s;
	r=(x+t/pow(10,s))*f;
}
double n;
int cnt1,cnt2;
int main(){
	read(n);
	if(n>=1&&n<10){cout<<n;return 0;}
	while(n<1)n*=10,cnt1++;
	while(n>=10)n/=10,cnt2++;
	if(cnt1)cout<<n<<"E-"<<cnt1;
	else cout<<n<<"E"<<cnt2;
	return 0;
}


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

const int maxn = 1e6 + 10;
int l = 1, r;
char str[maxn];

int find(char ch) {
    for (int i = l; i <= r; i++) {
        if (str[i] == ch) {
            return i;
        }
    }
    return EOF;
}

int main() {
    gets(str + 1);
    r = strlen(str + 1);
    int point = find('.');
    for (; str[l] == 48; l++);
    for (; (~point) && str[r] == 48; r--);
    if (str[r] == '.') {
        r--;
    }
    if (str[l] == '.') {
        int e = -1, pos = l + 1;
        for (; str[pos] == '0'; pos ++, e--);
        putchar(str[pos]);
        if (pos != r) {
            putchar('.');
            for (int i = pos + 1; i <= r; i++)
                putchar(str[i]);
        }
        printf("E%d", e);
        return 0;
    }
    int e = ((~point) ? point - 1 : r) - l;
    int _ = r;
    for (; _ > l && str[_] == 48; _--);
    putchar(str[l]);
    if (e && _ > l) {
        putchar('.');
    }
    for (int i = l + 1; i <= _; i++) {
        if (str[i] != '.' || !e) {
            putchar(str[i]);
        }
    }
    if (e) {
        printf("E%d", e);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
string s;
int ans1[1000005],ans2[1000005];
int to1,to2,pd1,pdd,pd2,zz1,zz2,zz3;
signed main(){
	cin>>s;
	int n=s.length();
//	cout<<n<<endl;
	int x=0;
	pdd=0;
	while(s[x]-'0'==0)x++;
	for(int i = x;i < n;i ++){
		if(s[i]=='.'){
			pdd=1;
			continue;
		}
		if(!pdd){
			ans1[++to1]=s[i]-'0';
			if(s[i]-'0'!=0){
				pd1=1;zz1=to1;
			}
			continue;
		}
		if(pdd){
			ans2[++to2]=s[i]-'0';
			if(s[i]-'0'!=0){
				pd2=1;zz2=to2;
			}
			if(!pd2&&s[i]-'0'==0){
				zz3=to2;
			}
		}
	}
	if(!pdd||(pdd&&pd1&&!pd2)){
		cout<<ans1[1];
		if(zz1>1)cout<<".";
		for(int i = 2;i<=zz1;i++)
		cout<<ans1[i];
		if(to1>1)cout<<"E"<<to1-1;
		return 0;
	}
	else if(pdd&&pd1&&pd2){
		for(int i = 1;i<=to1;i++)
			cout<<ans1[i];
			cout<<".";
		for(int i = 1;i<=zz2;i++)
			cout<<ans2[i];
			return 0;
	}
	else if(!pd1&&pdd&&pd2){
		cout<<ans2[zz3+1];
		if(zz2>zz3+1)cout<<".";
		for(int i = zz3+2;i<=zz2;i++)
		cout<<ans2[i];
		cout<<"E-"<<zz3+1;
		return 0;
	}
	cout<<"0";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    float n;
    int ans=0;
    cin>>n;
    //cout<<n<<endl;
    if(n>=1&&n<10){
    	cout<<n;
	}
	else if(n>=10){
		//cout<<1<<endl;
		for(int i=0;;i++){
			if(n>=10){
				n/=10;
				ans++;
			}
			else{
				break;
			}
		}
		cout<<n<<"E"<<ans;
	}
	else if(n<1){
	    //cout<<1<<endl;
		for(int i=0;;i++){
			if(n<1){
				n*=10;
				ans++;
			}
			else{
				break;
			}
		}
		cout<<n<<"E"<<"-"<<ans;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
float n,s;
int main()
{
	cin>>n;
	s=n;
	if(s>=10)
	{
		int i;
		for(i=1;;i++)
		{
			s/=10;
			if(s<10)
			{
				break;
			}
		}
		cout<<s<<"E"<<i;
	}
	else if(s<1)
	{
		int i;
		for(i=1;;i++)
		{
			s*=10;
			if(s>=1)
			{
				break;
			}
		}
		cout<<s<<"E-"<<i;
	}
	else if(s>=1 && s<10)
	{
		cout<<s;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin>>s;
    if(s.back()=='.')
        s.pop_back();
    int cur=0;
    while(s[cur]=='0')
        ++cur;
    s.erase(0,cur);
    int curE=0;
    int pos=-1;
    for(int i=0;i<s.size();i++)
        if(s[i]=='.')
            pos=i;
    if(pos<0)
    {
        s.push_back('.');
        pos=s.size()-1;
    }
    if(pos==0)
    {
        s.erase(0,1);
        int cur=0;
        while(s[cur]=='0')
        {
            ++cur;
            --curE;
        }
        while(s.back()=='0')
            s.pop_back();
        s.erase(0,cur);
        --curE;
        cout<<s[0];
        if(s.size()>1)
        {
            cout<<".";
            for(int i=1;i<s.size();i++)
                cout<<s[i];
        }
        if(curE)
            cout<<"E"<<curE<<"\n";
    }else
    {
        while(pos>1)
        {
            ++curE;
            swap(s[pos],s[pos-1]);
            --pos;
        }
        while(s.back()=='0')
            s.pop_back();
        if(s.size()==2)
            s.erase(1,1);
        cout<<s;
        if(curE)
        {
            cout<<"E"<<curE<<"\n";
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin>>s;
    if(s.back()=='.')
        s.pop_back();
    int cur=0;
    while(s[cur]=='0')
        ++cur;
    s.erase(0,cur);
    int curE=0;
    int pos=-1;
    for(int i=0;i<s.size();i++)
        if(s[i]=='.')
            pos=i;
    if(pos<0)
    {
        s.push_back('.');
        pos=s.size()-1;
    }
    if(pos==0)
    {
        s.erase(0,1);
        int cur=0;
        while(s[cur]=='0')
        {
            ++cur;
            --curE;
        }
        while(s.back()=='0')
            s.pop_back();
        s.erase(0,cur);
        --curE;
        cout<<s[0];
        if(s.size()>1)
        {
            cout<<".";
            for(int i=1;i<s.size();i++)
                cout<<s[i];
        }
        if(curE)
            cout<<"E"<<curE<<"\n";
    }else
    {
        while(pos>1)
        {
            ++curE;
            swap(s[pos],s[pos-1]);
            --pos;
        }
        while(s.back()=='0')
            s.pop_back();
        cout<<s;
        if(curE)
        {
            cout<<"E"<<curE<<"\n";
        }
    }
}


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

string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>s;
    int l=0;
    while(s[l]=='0')
        ++l;
    s.erase(0,l);
    int r=s.size()-1;
    while(s[r]=='0')
        --r;
    ++r;
    if(s[0]=='.')
    {
        int len=r-1;
        string a;
        s.erase(0,1);
        int l=0;
        while(s[l]=='0')
            ++l;
        s.erase(0,l);
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        for(int i=0;i<=r;i++)
            a.push_back(s[i]);
        cout<<a[0];
        if(a.size()>1)
        {
            cout<<".";
            for(int i=1;i<a.size();i++)
                cout<<a[i];
            if(len)
            {
                cout<<"E-";
                cout<<len;
            }
            return 0;
        }else
        {
            if(len)
                cout<<"E-"<<len<<"\n";
            return 0;
        }
    }
    int pos=0;
    for(int i=1;i<=r;i++)
        if(s[i]=='.')
            pos=i;
    if(!pos || pos==s.size()-1)
    {
        if(s[s.size()-1]=='.')
            s.erase(s.size()-1,1);
        int len=s.size()-1;
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        ++r;
        if(r-1!=0)
            cout<<".";
        for(int i=1;i<r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }else
    {
        int len=pos-1;
        s.erase(pos,1);
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        ++r;
        if(r-1!=0)
            cout<<".";
        for(int i=1;i<r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }
}


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

string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>s;
    int l=0;
    while(s[l]=='0')
        ++l;
    s.erase(0,l);
    int r=s.size()-1;
    while(s[r]=='0')
        --r;
    ++r;
    if(s[0]=='.')
    {
        int len=r-1;
        string a;
        for(int i=1;i<r;i++)
            a.push_back(s[i]);
        cout<<a[0];
        if(a.size()>1)
        {
            cout<<".";
            for(int i=1;i<a.size();i++)
                cout<<a[i];
            if(len)
            {
                cout<<"E-";
                cout<<len;
            }
            return 0;
        }else
        {
            if(len)
                cout<<"E-"<<len<<"\n";
            return 0;
        }
    }
    int pos=0;
    for(int i=1;i<=r;i++)
        if(s[i]=='.')
            pos=i;
    if(!pos || pos==s.size()-1)
    {
        if(s[s.size()-1]=='.')
            s.erase(s.size()-1,1);
        int len=s.size()-1;
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        ++r;
        if(r-1!=0)
            cout<<".";
        for(int i=1;i<r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }else
    {
        int len=pos-1;
        s.erase(pos,1);
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        ++r;
        if(r-1!=0)
            cout<<".";
        for(int i=1;i<r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }
}


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

string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>s;
    int l=0;
    while(s[l]=='0')
        ++l;
    s.erase(0,l);
    int r=s.size()-1;
    while(s[r]=='0')
        --r;
    ++r;
    if(s[0]=='.')
    {
        int len=0;
        string a;
        s.erase(0,1);
        int l=0;
        while(s[l]=='0')
            ++l;
        s.erase(0,l);
        len+=l;
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        for(int i=0;i<=r;i++)
            a.push_back(s[i]);
        len+=r;
        ///cout<<len<<' '<<r<<' '<<s<<"\n";
        cout<<a[0];
        if(a.size()>1)
        {
            cout<<".";
            for(int i=1;i<a.size();i++)
                cout<<a[i];
            if(len)
            {
                cout<<"E-";
                cout<<len;
            }
            return 0;
        }else
        {
            if(len)
                cout<<"E-"<<len<<"\n";
            return 0;
        }
    }
    int pos=0;
    for(int i=1;i<=r;i++)
        if(s[i]=='.')
            pos=i;
    if(!pos || pos==s.size()-1)
    {
        if(s[s.size()-1]=='.')
            s.erase(s.size()-1,1);
        int len=s.size()-1;
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        if(r!=0)
            cout<<".";
        for(int i=1;i<=r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }else
    {
        int len=pos-2;
        s.erase(pos,1);
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        if(r!=0)
            cout<<".";
        for(int i=1;i<=r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }
}


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

string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>s;
    int l=0;
    while(s[l]=='0')
        ++l;
    s.erase(0,l);
    int r=s.size()-1;
    while(s[r]=='0')
        --r;
    ++r;
    if(s[0]=='.')
    {
        int len=r-1;
        string a;
        s.erase(0,1);
        int l=0;
        while(s[l]=='0')
            ++l;
        s.erase(0,l);
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        for(int i=0;i<=r;i++)
            a.push_back(s[i]);
        cout<<a[0];
        if(a.size()>1)
        {
            cout<<".";
            for(int i=1;i<a.size();i++)
                cout<<a[i];
            if(len)
            {
                cout<<"E-";
                cout<<len;
            }
            return 0;
        }else
        {
            if(len)
                cout<<"E-"<<len<<"\n";
            return 0;
        }
    }
    int pos=0;
    for(int i=1;i<=r;i++)
        if(s[i]=='.')
            pos=i;
    if(!pos || pos==s.size()-1)
    {
        if(s[s.size()-1]=='.')
            s.erase(s.size()-1,1);
        int len=s.size()-1;
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        if(r!=0)
            cout<<".";
        for(int i=1;i<=r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }else
    {
        int len=pos-1;
        s.erase(pos,1);
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        if(r!=0)
            cout<<".";
        for(int i=1;i<=r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }
}


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

string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>s;
    int l=0;
    while(s[l]=='0')
        ++l;
    s.erase(0,l);
    int r=s.size()-1;
    while(s[r]=='0')
        --r;
    ++r;
    if(s[0]=='.')
    {
        int len=r-1;
        string a;
        s.erase(0,1);
        int l=0;
        while(s[l]=='0')
            ++l;
        s.erase(0,l);
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        ++r;
        for(int i=0;i<r;i++)
            a.push_back(s[i]);
        cout<<a[0];
        if(a.size()>1)
        {
            cout<<".";
            for(int i=1;i<a.size();i++)
                cout<<a[i];
            if(len)
            {
                cout<<"E-";
                cout<<len;
            }
            return 0;
        }else
        {
            if(len)
                cout<<"E-"<<len<<"\n";
            return 0;
        }
    }
    int pos=0;
    for(int i=1;i<=r;i++)
        if(s[i]=='.')
            pos=i;
    if(!pos || pos==s.size()-1)
    {
        if(s[s.size()-1]=='.')
            s.erase(s.size()-1,1);
        int len=s.size()-1;
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        ++r;
        if(r-1!=0)
            cout<<".";
        for(int i=1;i<r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }else
    {
        int len=pos-1;
        s.erase(pos,1);
        cout<<s[0];
        int r=s.size()-1;
        while(s[r]=='0')
            --r;
        ++r;
        if(r-1!=0)
            cout<<".";
        for(int i=1;i<r;i++)
            cout<<s[i];
        if(len)
            cout<<"E"<<len<<"\n";
        return 0;
    }
}


#include<bits/stdc++.h>
using namespace std;
string s; int c , p , t , z;bool b;
int main()
{
	cin >> s;
	if(s.size()==1)
	   if(s[0] != '.')
	   {
	   	   printf("%c\n",s[0]);
	   	   return 0;
	   }
	   else
	   {
	   	printf("%c\n",'0');
	   	return 0;
	   }
	for(int i = 0 ; i < s.size() ;i++)
	   if(s[i]=='.')
	   {
	      b = 1;
	      p = i;
	      break;
	   }
	for(int i = 0 ; i < s.size() ; i++)
		    if(s[i] == '0')
		       t++;
		    else
		       break;
	s.erase(s.begin() , s.begin()+t);
	p-=t;
	if(!b)
	{
		for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		s.erase(s.end()-z , s.end());
		if(s.size() >= 2)
		   printf("%c.",s[0]);
		else
		   printf("%c",s[0]);
		for(int i = 1 ; i < s.size() ; i++)
			printf("%c",s[i]);
		printf("E%d\n",s.size()-1+z);
	}
	else
	{
		for(int i = s.size()-1 ; i > 0 ; i--)
		    if(s[i]=='0')
		       s.erase(s.begin()+i);
		    else
		       break;
		if(s[0] == '.')
		{
			for(int i = i ; i < s.size() ; i++)
			   if(s[i] == '0')
			      c++;
			    else
			      break;
			if(s.size() > 2)
			   printf("%c.",s[c+1]);
			else
			  printf("%c",s[c+1]);
			for(int i = c+2 ; i < s.size() ; i++)
			    printf("%c",s[i]);
			printf("E%d\n",-c-1);
		}
		else if(p > 1 && p != s.size()-1)
		{
			if(s.size() > 2)
			  printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		    for(int i = 1 ; i < s.size() ; i++)
		       if(s[i]!='.')
			     printf("%c",s[i]);
		    printf("E%d\n",p);
		}
		else if(p==s.size()-1)
		{
			s.erase(s.begin()+s.size()-1);
			for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		    s.erase(s.end()-z , s.end());
		    if(s.size() >= 2)
			   printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		       for(int i = 1 ; i < s.size() ; i++)
		       	printf("%c",s[i]);
		    printf("E%d\n",s.size()-1+z);
		}
		else
		{

		   for(int i = 0 ; i < s.size() ; i++)
		      printf("%c",s[i]);
		    printf("\n");
	    }

	}
}


#include<bits/stdc++.h>
using namespace std;
string s; int c , p , t , z;bool b;
int main()
{
	cin >> s;
	if(s.size()==1)
	   if(s[0] != '.')
	   {
	   	   printf("%c\n",s[0]);
	   	   return 0;
	   }
	   else
	   {
	   	printf("%c\n",'0');
	   	return 0;
	   }
	for(int i = 0 ; i < s.size() ;i++)
	   if(s[i]=='.')
	   {
	      b = 1;
	      p = i;
	      break;
	   }
	for(int i = 0 ; i < s.size() ; i++)
		    if(s[i] == '0')
		       t++;
		    else
		       break;
	s.erase(s.begin() , s.begin()+t);
	p-=t;
	if(!b)
	{
		for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		s.erase(s.end()-z , s.end());
		if(s.size() >= 2)
		   printf("%c.",s[0]);
		else
		   printf("%c",s[0]);
		for(int i = 1 ; i < s.size() ; i++)
			printf("%c",s[i]);
		printf("E%d\n",s.size()-1+z);
	}
	else
	{
		for(int i = s.size()-1 ; i > 0 ; i--)
		    if(s[i]=='0')
		       s.erase(s.begin()+i);
		    else
		       break;
		if(s[0] == '.')
		{
			for(int i = 1 ; i < s.size() ; i++)
			   if(s[i] == '0')
			      c++;
			    else
			      break;
			if(s.size() > 2)
			   printf("%c.",s[c+1]);
			else
			  printf("%c",s[c+1]);
			for(int i = c+2 ; i < s.size() ; i++)
			    printf("%c",s[i]);
			printf("E%d\n",-c-1);
		}
		else if(p > 1 && p != s.size()-1)
		{
			if(s.size() > 2)
			  printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		    for(int i = 1 ; i < s.size() ; i++)
		       if(s[i]!='.')
			     printf("%c",s[i]);
		    printf("E%d\n",p);
		}
		else if(p==s.size()-1)
		{
			s.erase(s.begin()+s.size()-1);
			for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		    s.erase(s.end()-z , s.end());
		    if(s.size() >= 2)
			   printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		       for(int i = 1 ; i < s.size() ; i++)
		       	printf("%c",s[i]);
		    printf("E%d\n",s.size()-1+z);
		}
		else
		{

		   for(int i = 0 ; i < s.size() ; i++)
		      printf("%c",s[i]);
		    printf("\n");
	    }

	}
}


#include<bits/stdc++.h>
using namespace std;
string s; int c , p , t , z;bool b;
int main()
{
	cin >> s;
	if(s.size()==1)
	   if(s[0] != '.')
	   {
	   	   printf("%c\n",s[0]);
	   	   return 0;
	   }
	   else
	   {
	   	printf("%c\n",'0');
	   	return 0;
	   }
	for(int i = 0 ; i < s.size() ;i++)
	   if(s[i]=='.')
	   {
	      b = 1;
	      p = i;
	      break;
	   }
	for(int i = 0 ; i < s.size() ; i++)
		    if(s[i] == '0')
		       t++;
		    else
		       break;
	s.erase(s.begin() , s.begin()+t);
	p-=t;
	if(!b)
	{
		for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		s.erase(s.end()-z , s.end());
		if(s.size() >= 2)
		   printf("%c.",s[0]);
		else
		   printf("%c",s[0]);
		for(int i = 1 ; i < s.size() ; i++)
			printf("%c",s[i]);
		printf("E%d\n",s.size()-1+z);
	}
	else
	{
		for(int i = s.size()-1 ; i > 0 ; i--)
		    if(s[i]=='0')
		       s.erase(s.begin()+i);
		    else
		       break;
		if(s[0] == '.')
		{
			for(int i = 1 ; i < s.size() ; i++)
			   if(s[i] == '0')
			      c++;
			    else
			      break;
			if(s.size()-c > 2)
			   printf("%c.",s[c+1]);
			else
			  printf("%c",s[c+1]);
			for(int i = c+2 ; i < s.size() ; i++)
			    printf("%c",s[i]);
			printf("E%d\n",-c-1);
		}
		else if(p > 1 && p != s.size()-1)
		{
			if(s.size() > 2)
			  printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		    for(int i = 1 ; i < s.size() ; i++)
		       if(s[i]!='.')
			     printf("%c",s[i]);
		    printf("E%d\n",p-1);
		}
		else if(p==s.size()-1)
		{
			s.erase(s.begin()+s.size()-1);
			for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		    s.erase(s.end()-z , s.end());
		    if(s.size() >= 2)
			   printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		       for(int i = 1 ; i < s.size() ; i++)
		       	printf("%c",s[i]);
		    if(s.size()-1+z)
		        printf("E%d\n",s.size()-1+z);
		}
		else
		{

		   for(int i = 0 ; i < s.size() ; i++)
		      printf("%c",s[i]);
		    printf("\n");
	    }

	}
}


#include<bits/stdc++.h>
using namespace std;
string s; int c , p , t , z;bool b;
int main()
{
	cin >> s;
	for(int i = 0 ; i < s.size() ;i++)
	   if(s[i]=='.')
	   {
	      b = 1;
	      p = i;
	      break;
	   }
	for(int i = 0 ; i < s.size() ; i++)
		    if(s[i] == '0')
		       t++;
		    else
		       break;
	s.erase(s.begin() , s.begin()+t);
	p-=t;
	if(!b)
	{
		for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		s.erase(s.end()-z , s.end());
		printf("%c.",s[0]);
		for(int i = 1 ; i < s.size() ; i++)
			printf("%c",s[i]);
		printf("E%d\n",s.size()-1+z);
	}
	else
	{
		for(int i = s.size()-1 ; i > 0 ; i--)
		    if(s[i]=='0')
		       s.erase(s.begin()+i);
		    else
		       break;
		if(s[0] == '.')
		{
			for(int i = i ; i < s.size() ; i++)
			   if(s[i] == '0')
			      c++;
			    else
			      break;
			printf("%c.",s[c+1]);
			for(int i = c+2 ; i < s.size() ; i++)
			    printf("%c",s[i]);
			printf("E%d\n",-c-1);
		}
		else if(p > 1 && p != s.size()-1)
		{
			printf("%c.",s[0]);
		    for(int i = 1 ; i < s.size() ; i++)
		       if(s[i]!='.')
			     printf("%c",s[i]);
		    printf("E%d\n",p);
		}
		else if(p==s.size()-1)
		{
			s.erase(s.begin()+s.size()-1);
			for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		    s.erase(s.end()-z , s.end());
			printf("%c.",s[0]);
		       for(int i = 1 ; i < s.size() ; i++)
		       	printf("%c",s[i]);
		    printf("E%d\n",s.size()-1+z);
		}
		else
		{

		   for(int i = 0 ; i < s.size() ; i++)
		      printf("%c",s[i]);
		    printf("\n");
	    }

	}
}


#include<bits/stdc++.h>
using namespace std;
string s; int c , p , t , z;bool b;
int main()
{
	cin >> s;
	for(int i = 0 ; i < s.size() ;i++)
	   if(s[i]=='.')
	   {
	      b = 1;
	      p = i;
	      break;
	   }
	for(int i = 0 ; i < s.size() ; i++)
		    if(s[i] == '0')
		       t++;
		    else
		       break;
	s.erase(s.begin() , s.begin()+t);
	p-=t;
	if(!b)
	{
		for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		s.erase(s.end()-z , s.end());
		printf("%c.",s[0]);
		for(int i = 1 ; i < s.size() ; i++)
			printf("%c",s[i]);
		printf("E%d\n",s.size()-1+z);
	}
	else
	{
		for(int i = s.size()-1 ; i > 0 ; i--)
		    if(s[i]=='0')
		       s.erase(s.begin()+i);
		    else
		       break;
		if(s[0] == '.')
		{
			for(int i = i ; i < s.size() ; i++)
			   if(s[i] == '0')
			      c++;
			    else
			      break;
			printf("%c",s[c+1]);
			for(int i = c+2 ; i < s.size() ; i++)
			    printf("%c",s[i]);
			printf("E%d\n",-c-1);
		}
		else if(p > 1 && p != s.size()-1)
		{
			printf("%c.",s[0]);
		    for(int i = 1 ; i < s.size() ; i++)
		       if(s[i]!='.')
			     printf("%c",s[i]);
		    printf("E%d\n",p);
		}
		else if(p==s.size()-1)
		{
			s.erase(s.begin()+s.size()-1);
			for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		    s.erase(s.end()-z , s.end());
			printf("%c.",s[0]);
		       for(int i = 1 ; i < s.size() ; i++)
		       	printf("%c",s[i]);
		    printf("E%d\n",s.size()-1+z);
		}
		else
		{

		   for(int i = 0 ; i < s.size() ; i++)
		      printf("%c",s[i]);
		    printf("\n");
	    }

	}
}


#include<bits/stdc++.h>
using namespace std;
string s; int c , p , t , z;bool b;
int main()
{
	cin >> s;
	if(s.size()==1)
	   if(s[0] != '.')
	   {
	   	   printf("%c\n",s[0]);
	   	   return 0;
	   }
	   else
	   {
	   	printf("%c\n",'0');
	   	return 0;
	   }
	for(int i = 0 ; i < s.size() ;i++)
	   if(s[i]=='.')
	   {
	      b = 1;
	      p = i;
	      break;
	   }
	for(int i = 0 ; i < s.size() ; i++)
		    if(s[i] == '0')
		       t++;
		    else
		       break;
	s.erase(s.begin() , s.begin()+t);
	p-=t;
	if(!b)
	{
		for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		s.erase(s.end()-z , s.end());
		if(s.size() >= 2)
		   printf("%c.",s[0]);
		else
		   printf("%c",s[0]);
		for(int i = 1 ; i < s.size() ; i++)
			printf("%c",s[i]);
		printf("E%d\n",s.size()-1+z);
	}
	else
	{
		for(int i = s.size()-1 ; i > 0 ; i--)
		    if(s[i]=='0')
		       s.erase(s.begin()+i);
		    else
		       break;
		if(s[0] == '.')
		{
			for(int i = 1 ; i < s.size() ; i++)
			   if(s[i] == '0')
			      c++;
			    else
			      break;
			if(s.size() > 2)
			   printf("%c.",s[c+1]);
			else
			  printf("%c",s[c+1]);
			for(int i = c+2 ; i < s.size() ; i++)
			    printf("%c",s[i]);
			printf("E%d\n",-c-1);
		}
		else if(p > 1 && p != s.size()-1)
		{
			if(s.size() > 2)
			  printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		    for(int i = 1 ; i < s.size() ; i++)
		       if(s[i]!='.')
			     printf("%c",s[i]);
		    printf("E%d\n",p-1);
		}
		else if(p==s.size()-1)
		{
			s.erase(s.begin()+s.size()-1);
			for(int i = s.size() - 1 ; i>= 0 ; i--)
			if(s[i]=='0')
			   z++;
			else
			   break;
		    s.erase(s.end()-z , s.end());
		    if(s.size() >= 2)
			   printf("%c.",s[0]);
			else
			  printf("%c",s[0]);
		       for(int i = 1 ; i < s.size() ; i++)
		       	printf("%c",s[i]);
		    if(s.size()-1+z)
		        printf("E%d\n",s.size()-1+z);
		}
		else
		{

		   for(int i = 0 ; i < s.size() ; i++)
		      printf("%c",s[i]);
		    printf("\n");
	    }

	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <cstring>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include <climits>
#include <map>
#include <stack>
#include <queue>
#include <sstream>
#include <deque>
#include <utility>
#include <complex>
#include <bitset>
#include <numeric>
#include<iomanip>

using namespace std;

#define pb push_back
#define MP make_pair
#define sz(v) (int)v.size()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,a,b) for(int i=(a);i>=(b);i--)
#define mem(s,v) memset(s,v,sizeof(s))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define flush fflush(stdout)
#define ndl puts("")
#define oo (1 << 28)
#define ss	                second
#define ff	                first

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int, int> > vpi;
typedef pair<int, int> pi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

void openfile()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}

int main()
{
	string s; cin >> s;
	int idx = s.find('.');
	if (idx == -1)
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
			i++;
		}
		int sz = s.size();
		if (!sz){ cout << 0 << endl; return 0; }
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (sz == 1)cout << s << endl;
		else cout << s << "E" << sz - 1 << endl;
	}
	else
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
			i++;
		}
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
		}
		idx = s.find('.');
		s.erase(s.begin() + idx);
		if (s.size() == 0){ cout << 0 << endl; return 0; }
		s.insert(s.begin() + 1, '.');
		int x = idx - 1;
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (!x)cout << s << endl;
		else cout << s << "E" << x << endl;
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <cstring>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include <climits>
#include <map>
#include <stack>
#include <queue>
#include <sstream>
#include <deque>
#include <utility>
#include <complex>
#include <bitset>
#include <numeric>
#include<iomanip>

using namespace std;

#define pb push_back
#define MP make_pair
#define sz(v) (int)v.size()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,a,b) for(int i=(a);i>=(b);i--)
#define mem(s,v) memset(s,v,sizeof(s))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define flush fflush(stdout)
#define ndl puts("")
#define oo (1 << 28)
#define ss	                second
#define ff	                first

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int, int> > vpi;
typedef pair<int, int> pi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

void openfile()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}

int main()
{
	string s; cin >> s;
	int idx = s.find('.');
	if (idx == -1)
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
			i++;
		}
		int sz = s.size();
		if (!sz){ cout << 0 << endl; return 0; }
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (sz == 1)cout << s << endl;
		else cout << s << "E" << sz - 1 << endl;
	}
	else
	{
		int x = idx - 1;
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--),x--;
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
			i++;
		}
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--), x--;
			else break;
			i++;
		}
		if (s.size() == 0){ cout << 0 << endl; return 0; }
		int u = s.find('.');
		if (u != -1)s.erase(s.begin() + u);
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (!x)cout << s << endl;
		else cout << s << "E" << x << endl;
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <cstring>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include <climits>
#include <map>
#include <stack>
#include <queue>
#include <sstream>
#include <deque>
#include <utility>
#include <complex>
#include <bitset>
#include <numeric>
#include<iomanip>

using namespace std;

#define pb push_back
#define MP make_pair
#define sz(v) (int)v.size()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,a,b) for(int i=(a);i>=(b);i--)
#define mem(s,v) memset(s,v,sizeof(s))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define flush fflush(stdout)
#define ndl puts("")
#define oo (1 << 28)
#define ss	                second
#define ff	                first

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int, int> > vpi;
typedef pair<int, int> pi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

void openfile()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}

int main()
{
	string s; cin >> s;
	int idx = s.find('.');
	if (idx == -1)
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
			i++;
		}
		int sz = s.size();
		if (!sz){ cout << 0 << endl; return 0; }
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (sz == 1)cout << s << endl;
		else cout << s << "E" << sz - 1 << endl;
	}
	else
	{
		int x = idx - 1;
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--),x--;
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
			i++;
		}
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--), x--;
			else break;
			i++;
		}
		if (s.size() == 0){ cout << 0 << endl; return 0; }
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (!x)cout << s << endl;
		else cout << s << "E" << x << endl;
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <cstring>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include <climits>
#include <map>
#include <stack>
#include <queue>
#include <sstream>
#include <deque>
#include <utility>
#include <complex>
#include <bitset>
#include <numeric>
#include<iomanip>

using namespace std;

#define pb push_back
#define MP make_pair
#define sz(v) (int)v.size()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,a,b) for(int i=(a);i>=(b);i--)
#define mem(s,v) memset(s,v,sizeof(s))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define flush fflush(stdout)
#define ndl puts("")
#define oo (1 << 28)
#define ss	                second
#define ff	                first

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int, int> > vpi;
typedef pair<int, int> pi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

void openfile()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}

int main()
{
	string s; cin >> s;
	int idx = s.find('.');
	if (idx == -1)
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
			i++;
		}
		int sz = s.size();
		if (!sz){ cout << 0 << endl; return 0; }
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (sz == 1)cout << s << endl;
		else cout << s << "E" << sz - 1 << endl;
	}
	else
	{
		int x = idx - 1;
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--),x--;
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
			i++;
		}
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--), x--;
			else break;
			i++;
		}
		if (s.size() == 0){ cout << 0 << endl; return 0; }
		if (s.find('.') == -1);
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (!x)cout << s << endl;
		else cout << s << "E" << x << endl;
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <cstring>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include <climits>
#include <map>
#include <stack>
#include <queue>
#include <sstream>
#include <deque>
#include <utility>
#include <complex>
#include <bitset>
#include <numeric>
#include<iomanip>

using namespace std;

#define pb push_back
#define MP make_pair
#define sz(v) (int)v.size()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,a,b) for(int i=(a);i>=(b);i--)
#define mem(s,v) memset(s,v,sizeof(s))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define flush fflush(stdout)
#define ndl puts("")
#define oo (1 << 28)
#define ss	                second
#define ff	                first

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int, int> > vpi;
typedef pair<int, int> pi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

void openfile()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}

int main()
{
	string s; cin >> s;
	int idx = s.find('.');
	if (idx == -1)
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i);
			else break;
		}
		int sz = s.size();
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		cout << s << "E" << sz - 1 << endl;
	}
	else
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
			i++;
		}
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
		}
		idx = s.find('.');
		s.erase(s.begin() + idx);
		s.insert(s.begin() + 1, '.');
		int x = idx - 1;
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (!x)cout << s << endl;
		else cout << s << "E" << x << endl;
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <cstring>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include <climits>
#include <map>
#include <stack>
#include <queue>
#include <sstream>
#include <deque>
#include <utility>
#include <complex>
#include <bitset>
#include <numeric>
#include<iomanip>

using namespace std;

#define pb push_back
#define MP make_pair
#define sz(v) (int)v.size()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,a,b) for(int i=(a);i>=(b);i--)
#define mem(s,v) memset(s,v,sizeof(s))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define flush fflush(stdout)
#define ndl puts("")
#define oo (1 << 28)
#define ss	                second
#define ff	                first

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int, int> > vpi;
typedef pair<int, int> pi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

void openfile()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}

int main()
{
	string s; cin >> s;
	int idx = s.find('.');
	if (idx == -1)
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i);
			else break;
		}
		int sz = s.size();
		s.insert(s.begin() + 1, '.');
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (sz == 1)cout << s << endl;
		else cout << s << "E" << sz - 1 << endl;
	}
	else
	{
		int i = 0;
		while (i < s.size())
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
			i++;
		}
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else break;
		}
		idx = s.find('.');
		s.erase(s.begin() + idx);
		s.insert(s.begin() + 1, '.');
		int x = idx - 1;
		i = s.size() - 1;
		while (i >= 0)
		{
			if (s[i] == '0')s.erase(s.begin() + i--);
			else if (s[i] == '.')
			{
				s.erase(s.begin() + i--);
				break;
			}
			else break;
		}
		if (!x)cout << s << endl;
		else cout << s << "E" << x << endl;
	}
	return 0;
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Text;

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var t = Int32.Parse(Console.ReadLine());
            //var input = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x));

            for(int i = 0; i < t; i++)
            {
                var input = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x));
                var L = input.ElementAt(0);
                var v = input.ElementAt(1);
                var l = input.ElementAt(2);
                var r = input.ElementAt(3);

                var withoutTrain = L / v;
                var withTrain = r / v;
                var beforeTrain = (l - 1) / v;
                var count = withoutTrain - withTrain + beforeTrain;

                Console.WriteLine(count);
            }

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Codefoeces
{
    class Program
    {

        static void Main(string[] args)
        {

            int t = int.Parse(Console.ReadLine());
            for (int i = 0; i < t; i++)
            {
                string[] s = Console.ReadLine().Split();
                int L = int.Parse(s[0]);
                int v = int.Parse(s[1]);
                int l = int.Parse(s[2]);
                int r = int.Parse(s[3]);
                int count = 0;
                for (int j = v; j <= L; j+=v)
                {

                    if (j < l || j > r)
                    { count++; }
                }
                Console.WriteLine(count);
            }

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Codefoeces
{
    class Program
    {

        static void Main(string[] args)
        {

            int t = int.Parse(Console.ReadLine());
            for (int i = 0; i < t; i++)
            {
                string[] s = Console.ReadLine().Split();
                int L = int.Parse(s[0]);
                int v = int.Parse(s[1]);
                int l = int.Parse(s[2]);
                int r = int.Parse(s[3]);
                int count = (l-1)/v;
                for (int j = r+1; j <= L; j++)
                {
                    if(j%v == 0)
                    count++;
                }
                Console.WriteLine(count);
            }

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Codefoeces
{
    class Program
    {

        static void Main(string[] args)
        {

            int t = int.Parse(Console.ReadLine());
            for (int i = 0; i < t; i++)
            {
                string[] s = Console.ReadLine().Split();
                int L = int.Parse(s[0]);
                int v = int.Parse(s[1]);
                int l = int.Parse(s[2]);
                int r = int.Parse(s[3]);
                int count = L / v - (r/v - (l-1)/v);

                Console.WriteLine(count);
            }

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Codefoeces
{
    class Program
    {

        static void Main(string[] args)
        {

            int t = int.Parse(Console.ReadLine());
            for (int i = 0; i < t; i++)
            {
                string[] s = Console.ReadLine().Split();
                int L = int.Parse(s[0]);
                int v = int.Parse(s[1]);
                int l = int.Parse(s[2]);
                int r = int.Parse(s[3]);
                int count = L/v;
                for (int j = l; j <= r; j++)
                {
                    if(j%v == 0)
                    count--;
                }
                Console.WriteLine(count);
            }

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Codefoeces
{
    class Program
    {

        static void Main(string[] args)
        {

            int t = int.Parse(Console.ReadLine());
            for (int i = 0; i < t; i++)
            {
          string[] s = Console.ReadLine().Split();
                int L = int.Parse(s[0]);
                int v = int.Parse(s[1]);
                int l = int.Parse(s[2]);
                int r = int.Parse(s[3]);
                int count = 0;
                for (int j = 1; j <= L; j++)
                {
                    if (!(j >= l && j <= r) && j%v == 0)
                    {
                        count++;

                    }
                }
                Console.WriteLine(count);
            }

        }
    }
}


using System;
using System.Linq;

class Program
{
    static void Main()
    {
        var t = int.Parse(Console.ReadLine());
        for (var i = 0; i < t; i++)
        {
            var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var L = input[0];
            var v = input[1];
            var l = input[2];
            var r = input[3];

            var lanterns = L / v;
            var rLanterns = r / v;
            var lLanterns = l / v;
            var hiddenLanterns = rLanterns - lLanterns;
            if (l % v == 0)
                hiddenLanterns++;
            Console.WriteLine(lanterns - hiddenLanterns);
        }
    }
}


using System;

class Program
{
    static void Main()
    {
        var t = int.Parse(Console.ReadLine());
        for (var i = 0; i < t; i++)
        {
            var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var L = input[0];
            var v = input[1];
            var l = input[2];
            var r = input[3];

            var lanterns = L / v;
            var hiddenLanterns = (r - l) / v;
            if (l % v == 0)
                hiddenLanterns++;
            Console.WriteLine(lanterns - hiddenLanterns);
        }
    }
}


class Program
{
    static void Main()
    {
        var t = int.Parse(Console.ReadLine());
        for (var i = 0; i < t; i++)
        {
            var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var L = input[0];
            var v = input[1];
            var l = input[2];
            var r = input[3];

            var lanterns = L / v;
            var hiddenLanterns = (r - l) / v;
            if (l % v == 0)
                hiddenLanterns++;
            Console.WriteLine(lanterns - hiddenLanterns);
        }
    }
}


using System;
using System.Linq;

class Program
{
    static void Main()
    {
        var t = int.Parse(Console.ReadLine());
        for (var i = 0; i < t; i++)
        {
            var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var L = input[0];
            var v = input[1];
            var l = input[2];
            var r = input[3];

            var lanterns = L / v;
            var hiddenLanterns = (r - l) / v;
            if (l % v == 0)
                hiddenLanterns++;
            Console.WriteLine(lanterns - hiddenLanterns);
        }
    }
}


using System;
using System.Linq;

class Program
{
    static void Main()
    {
        var t = int.Parse(Console.ReadLine());
        for (var i = 0; i < t; i++)
        {
            var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var L = input[0];
            var v = input[1];
            var l = input[2];
            var r = input[3];

            var lanterns = L / v;
            var rLanters = r / v;
            var lLanters = l / v;
            var hiddenLanters = rLanters - lLanters;
            if (l % v == 0)
                hiddenLanters++;
            Console.WriteLine(lanterns - hiddenLanterns);
        }
    }
}


using System;

namespace CSharp
{
    public class _1066A
    {
        public static void Main()
        {
            for (int t = int.Parse(Console.ReadLine()); t > 0; t--)
            {
                string[] tokens = Console.ReadLine().Split();

                int L = int.Parse(tokens[0]);
                int v = int.Parse(tokens[1]);
                int l = int.Parse(tokens[2]);
                int r = int.Parse(tokens[3]);

                Console.WriteLine(Math.Min(l - 1, L) / v + L / v - Math.Min(r, L) / v);
            }
        }
    }
}


using System;
using System.Linq;
using CompLib.Util;
using System.Threading;

public class Program
{

    public void Solve()
    {
        var sc = new Scanner();
        Console.SetOut(new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        int t = sc.NextInt();
        for (int i = 0; i < t; i++)
        {
            Q(sc);
        }
        Console.Out.Flush();
    }

    void Q(Scanner sc)
    {
        int L = sc.NextInt();
        int v = sc.NextInt();
        int l = sc.NextInt();
        int r = sc.NextInt();

        int ll = L / v;

        int t = r / v - (l - 1) / v;
        Console.WriteLine(ll - t);
    }

    public static void Main(string[] args) => new Program().Solve();
    // public static void Main(string[] args) => new Thread(new Program().Solve, 1 << 27).Start();
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            if (_index >= _line.Length)
            {
                string s;
                do
                {
                    s = Console.ReadLine();
                } while (s.Length == 0);

                _line = s.Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public string ReadLine()
        {
            _index = _line.Length;
            return Console.ReadLine();
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            string s = Console.ReadLine();
            _line = s.Length == 0 ? new string[0] : s.Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}


using System;
using System.Text;

public class Program
{
    public void Solve()
    {
        var sc = new Scanner();
        int t = sc.NextInt();
        var sb = new StringBuilder();
        for (int i = 0; i < t; i++)
        {
            sb.AppendLine(Q(sc.NextInt(), sc.NextInt(), sc.NextInt(), sc.NextInt()));
        }

        Console.Write(sb.ToString());
    }

    string Q(int L, int v, int l, int r)
    {
        /*
         * ゴール L
         * 速度1
         *
         * n*vにランタンがある
         * [l,r]は見れない
         * 見れるやつの数

         */

        int cnt = L / v;
        int lr = r / v - (l - 1) / v;
        return (cnt - lr).ToString();
    }

    public static void Main(string[] args)
    {
        new Program().Solve();
    }
}

class Scanner
{
    public Scanner()
    {
        _pos = 0;
        _line = new string[0];
    }

    const char Separator = ' ';
    private int _pos;
    private string[] _line;

    #region スペース区切りで取得

    public string Next()
    {
        if (_pos >= _line.Length)
        {
            _line = Console.ReadLine().Split(Separator);
            _pos = 0;
        }

        return _line[_pos++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }

    #endregion

    #region 型変換

    private int[] ToIntArray(string[] array)
    {
        var result = new int[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = int.Parse(array[i]);
        }

        return result;
    }

    private long[] ToLongArray(string[] array)
    {
        var result = new long[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = long.Parse(array[i]);
        }

        return result;
    }

    private double[] ToDoubleArray(string[] array)
    {
        var result = new double[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = double.Parse(array[i]);
        }

        return result;
    }

    #endregion

    #region 配列取得

    public string[] Array()
    {
        if (_pos >= _line.Length)
            _line = Console.ReadLine().Split(Separator);

        _pos = _line.Length;
        return _line;
    }

    public int[] IntArray()
    {
        return ToIntArray(Array());
    }

    public long[] LongArray()
    {
        return ToLongArray(Array());
    }

    public double[] DoubleArray()
    {
        return ToDoubleArray(Array());
    }

    #endregion
}


using System;
using System.Collections.Generic;

namespace G6
{
    class Program
    {
        static void Main(string[] args)
        {
            string sin = Console.ReadLine().Trim(' ');
            int t = int.Parse(sin);
            int[] answers = new int[t];
            for (int Q = 0; Q < t; Q++)
            {
                int L, U, l, r;
                string[] sins = Console.ReadLine().Trim(' ').Split(' ');
                L = int.Parse(sins[0]);
                U = int.Parse(sins[1]);
                l = int.Parse(sins[2]);
                r = int.Parse(sins[3]);

                int all = L / U;
                int close = r / U - (l-1) / U;

                answers[Q] = all - close;
            }

            for (int i = 0; i < t; i++)
                Console.WriteLine(answers[i]);

            //Console.ReadKey();
        }
    }
}