You are given a positive decimal number x.

Your task is to convert it to the "simple exponential notation".

Let x = a·10^{b}, where 1 ≤ a < 10, then in general case the "simple exponential notation" looks like "aEb". If b equals to zero, the part "Eb" should be skipped. If a is an integer, it should be written without decimal point. Also there should not be extra zeroes in a and b.


-----Input-----

The only line contains the positive decimal number x. The length of the line will not exceed 10^6. Note that you are given too large number, so you can't use standard built-in data types "float", "double" and other.


-----Output-----

Print the only line — the "simple exponential notation" of the given number x.


-----Examples-----
Input
16

Output
1.6E1

Input
01.23400

Output
1.234

Input
.100

Output
1E-1

Input
100.

Output
1E2

Difficulty: interview

Starter code:

Solutions:
s = input()

if '.' not in s:
    s = s + '.'

p, q = s.strip('0').split('.')
if not p:
    t = q.strip('0')
    e = len(t) - len(q) - 1
    l = t[0]
    r = t[1:]
else:
    e = len(p) - 1
    l = p[0]
    r = (p[1:] + q).rstrip('0')

if l:
    print(l, end='')
else:
    print(0, end='')

if r:
    print('.' + r, end='')

if e:
    print('E%d' % e)
else:
    print()


s = input()
if '.' not in s:
    s = s+'.'
s = '0' + s + '0'
dp = s.find('.')
pre = s[0:dp]
post = s[dp + 1:]
i = 0
while i<len(pre)-1 and pre[i] == '0':
    i += 1
pre = pre[i:]
i = len(post) - 1
while i>0 and post[i] == '0':
    i -= 1
post = post[:i+1]
b = 0
if pre == '0':
    b -= len(post)
    pre = post
    post = '0'
    i = 0
    while i<len(pre)-1 and pre[i] == '0':
        i += 1
    pre = pre[i:]
b += len(pre)-1
post = pre[1:] + post
pre = pre[0]
i = len(post) - 1
while i>0 and post[i] == '0':
    i -= 1
post = post[:i+1]
if post == '0' or post == '':
    print(pre, end = '')
else:
    print(pre+'.'+post, end = '')
if b != 0:
    print('E'+str(b), end = '')
print('')


from sys import stdin,stdout


mot=stdin.readline()
virgule=None
for i in range(len(mot)):
        if mot[i]==".":
                virgule=i
if virgule!=None:
        mot=mot.replace(".","")
inf=0
sup=len(mot)-2

while mot[inf]=="0" and sup>inf:
        inf+=1
        
if virgule==None:
        puissance=sup-inf
else:
        puissance=virgule-inf-1

while mot[sup]=="0" and sup>inf:
        sup-=1

                
notation=mot[inf]

if inf==sup:
        notation=mot[inf]
else:
        notation=mot[inf]+"."+mot[inf+1:sup+1]

if puissance!=0:
        notation+="E"+str(puissance)
           
stdout.write(notation)





# You lost the game.
x = str(input())
n = len(x)
d = 0
while d < n and x[d] == "0":
    d += 1
f = n-1
while f >= 0 and x[f] == "0":
    f -= 1
f += 1
e = x.count(".")
if x.count("0") >= n-1 and e:
    print(0)
elif x[d] == ".":
    i = d+1
    while x[i] == "0":
        i += 1
    if f == i+1:
        print(x[i]+"E"+str(d-i))
    else:
        print(x[i]+"."+x[i+1:f]+"E"+str(d-i))
elif x[f-1] == ".":
    i = f-2
    while x[i] == "0":
        i -= 1
    if d+1 == i+1:
        if f-d-2:
            print(x[d]+"E"+str(f-d-2))
        else:
            print(x[d])
    else:
        print(x[d]+"."+x[d+1:i+1]+"E"+str(f-d-2))
elif e == 0:
    if d == f-1:
        if n-d-1:
            print(x[d]+"E"+str(n-d-1))
        else:
            print(x[d])
    else:
        print(x[d]+"."+x[d+1:f]+"E"+str(n-d-1))
elif x.index(".")-d == 1:
    print(x[d:f])
else:
    e = x.index(".")
    print(x[d]+"."+x[d+1:e]+x[e+1:f]+"E"+str(e-d-1))
    


string_list = input().split(sep='.')
integer = string_list[0].lstrip('0')
if len(string_list) == 1:
    fractional = ''
else:
    fractional = string_list[1].rstrip('0')
if integer:
    if fractional:
        a = "{}.{}{}".format(integer[0], integer[1:], fractional)
    else:
        a = "{}.{}".format(integer[0], integer[1:].rstrip('0'))
    b = len(integer) - 1
    if a[-1] == '.':
        a = a[:-1]
    if b > 0:
        print("E".join((a, str(b))))
    else:
        print(a)
else:
    old_len = len(fractional)
    fractional = fractional.lstrip('0')
    zero_count = old_len - len(fractional)
    a = "{}.{}".format(fractional[0], fractional[1:])
    b = -zero_count - 1
    if a[-1] == '.':
        a = a[:-1]
    print("E".join((a, str(b))))


import sys, math
s=input()
h=0
while h<len(s) and s[h]=='0':
    h+=1
s=s[h:]
if '.' in s and s[-1]=='0':
    g=1
    while g<=len(s) and s[-g]=='0':
        g+=1
    s=s[:(-g+1)]
if len(s)==0:
    print(0)
    return
idx=-1
for i in range(len(s)):
    if s[i]=='.':
        idx=i
        break
if idx==-1:
    idx=len(s)
else:
    if s[0]=='.':
        h=1
        while h<len(s) and s[h]=='0':
            idx-=1
            h+=1
if 1:
    mul = idx - 1
    
    new=''
    for i in range(len(s)):
        if s[i]!='.':
            new+=s[i]
    s=new
    if len(s) > 0 and s[-1]=='0':
        h=2
        while h<=len(s) and s[-h]=='0':
            h+=1
        s=s[:(-h+1)]
    if len(s) > 0 and s[0]=='0':
        h=1
        while h<len(s) and s[h]=='0':
            h+=1
        s=s[h:]
    mul=str(mul)
    if len(s)==0:
        print(0)
        return
    elif len(s)==1:
        print(s[0],end='')
        if mul != '0':
            print('E'+mul)
        return
    else:
        print(s[0]+'.'+s[1:],end='')
        if mul != '0':
            print('E'+mul)
        
        
            
    
            
    
        


s = str(input())


leng = len(s)
ind = s.find('.')

if ind == -1:
    i = 0
    while s[i]=='0':
        i+=1
    s = s[i:]
    if len(s)!=1:
        print(s[0:1]+(('.'+s.strip('0')[1:]) if len(s.strip('0')) > 1 else '')+'E'+str(len(s)-1))
    else:
        print(s[0:1]+(('.'+s.strip('0')[1:]) if len(s.strip('0')) > 1 else ''))
else:
    s = s.strip('0')
    ind = s.find('.')
    i = 0
    while s[i] == '0' or s[i]=='.':
        i += 1
    ind = s.find('.')
    if i >= ind:
        b = ind - i
    else:
        b = ind - 1
    ns = s[0:ind]+s[ind+1:]
    ns = ns.strip('0')
    if ind != 1:
        print(ns[0:1]+(('.'+ns[1:]) if len(ns) > 1 else '')+'E'+str(b))
    else:
        print(ns[0:1]+(('.'+ns[1:]) if len(ns) > 1 else ''))




s = input()
if "." not in s:
    s += "."

left,right = s.strip("0").split(".")

if not left:
    t = right.strip("0")
    e = len(t) - len(right) - 1
    l = t[0]
    r = t[1:]
else:
    e = len(left)-1
    l = left[0]
    r = (left[1:]+right).rstrip("0")

if l:
    print(l,end='')
else:
    print(0,end='')

if r:
    print("."+r,end='')

if e:
    print("E%d"%e)

import re

a = input()
if not '.' in a: a += '.'

a, b = a.strip('0').split('.')

st = 0
if len(a) > 1:
    st = len(a) - 1
    b = (a[1:] + b).rstrip('0')
    a = a[0]
elif len(a) == 0:
    r = b.strip('0')
    st = - (len(b) - len(r) + 1)
    a = r[0]
    b = r[1:]

if a: print (a, end = '')
if b: print ('.' + b, end = '')
if st: print('E' + str(st))


string_list = input().split(sep='.')
integer = string_list[0].lstrip('0')
if len(string_list) == 1:
    fractional = ''
else:
    fractional = string_list[1].rstrip('0')
if integer:
    if fractional:
        a = "{}.{}{}".format(integer[0], integer[1:], fractional)
    else:
        a = "{}.{}".format(integer[0], integer[1:].rstrip('0'))
    d = len(integer) - 1
    if a[-1] == '.':
        a = a[:-1]
    if d > 0:
        print("E".join((a, str(d))))
    else:
        print(a)
else:
    old_len = len(fractional)
    fractional = fractional.lstrip('0')
    zero_count = old_len - len(fractional)
    a = "{}.{}".format(fractional[0], fractional[1:])
    d = -zero_count - 1
    if a[-1] == '.':
        a = a[:-1]
    print("E".join((a, str(d))))


def task(n):
    l,r = n.partition('.')[::2]
    l = l.lstrip('0')

    exp = None
    if l:
        exp = len(l) - 1
        r = l[1:]+r
        l = l[0]
    else:
        strippedr = r.lstrip('0')
        exp = len(strippedr) - len(r) - 1
        l = strippedr[0]
        r = strippedr[1:]
    r = r.rstrip('0')
    return l + (('.%s' % r) if r else '') + (('E%d' % exp) if exp else '')

n = [input()]
#n = ['16', '01.23400', '.100', '100.']
for t in n:
    print(task(t))

s = input()
if not '.' in s: s += '.'
a,b = s.strip('0').split('.')
if len(a) > 0:
  b = (a[1:] + b).rstrip('0')
  le = len(a)-1
  a = a[0]
else:
  le = len(b.strip('0')) - len(b) - 1
  b = b.strip('0').rstrip('0')
  a = b[0]
  b = b[1:]

print(a,end='')
if len(b): print('.' + b,end='')
if le : print('E'+str(le))


s = input()
if not '.' in s: s += '.'
a,b = s.strip('0').split('.')
if len(a) > 0:
  b = (a[1:] + b).rstrip('0')
  le = len(a)-1
  a = a[0]
else:
  le = len(b.strip('0')) - len(b) - 1
  b = b.strip('0').rstrip('0')
  a = b[0]
  b = b[1:]

print(a,end='')
if len(b): print('.' + b,end='')
if le : print('E'+str(le))

	  	  			  					   	  	 		

3

def main():
	s = input()

	has_dot = False
	zero = True
	first_non_zero = 0
	last_non_zero = 0
	sep = len( s )

	for i , c in enumerate( s ):
		if c != "0":
			if c == ".":
				sep = i
				has_dot = True
			elif zero:
				zero = False
				first_non_zero = i
				last_non_zero = i
			else:
				last_non_zero = i


	b = sep - first_non_zero
	if b > 0:
		b -= 1
	a = s[ first_non_zero : last_non_zero + 1 ]
	a = "".join( a.split(".") ) 
	if len( a ) > 1:
		a = ( a[ 0 ] + "." + a[ 1: ] )

	print( ( a if not zero else "0" ) + ( ( "E" + str( b ) ) if b != 0 else "" ) ) 

def __starting_point():
	main()
__starting_point()

x = input()

a = 0;
b = 0;

sc = x.lstrip('0')
if '.' not in sc:
	sc += '.'

if sc[0] == '.':
	sc = '0' + sc
if sc[-1] == '.':
	sc = sc + '0'

if sc[0] == '0':
	sc = sc.replace('.', '')
	i = 0;
	while sc[i] == '0':
		i += 1
		b -= 1

	sc = sc[i] + '.' + sc[i + 1:]

if ('.' not in sc) and (len(sc) > 1):
	sc = sc[0] + '.' + sc[1:]
	b += 1

b += ( sc.find('.') - 1)

sc = sc.replace('.', '')
a = sc[0] + '.' + sc[1:]

a = a.strip('0')

if a[-1] == '.':
	a = a[:-1]


sc = a + ( '' if (b == 0) else ('E'+str(b)) )
print(sc)


s = input()
if '.' not in s:
    s = s + '.'
p, q = s.strip('0').split('.')
if not p:
    t = q.strip('0')
    e = len(t) - len(q) - 1
    l = t[0]
    r = t[1:]
else:
    e = len(p) - 1
    l = p[0]
    r = (p[1:] + q).rstrip('0')
if l:
    print(l, end = '')
else:
    print(0, end = '')
if r:
    print('.' + r, end = '')
if e:
    print('E%d' % e, end = '')

  	 	   			      	 				   	 			

s = input()
if '.' not in s:
    s += '.'
s = s.strip('0')
a,b = s.split('.')
if len(a):
    b = a[1:] + b
    b = b.rstrip('0')
    l = len(a) - 1
    a = a[0]
else:
    l = len(b.strip('0')) - len(b) - 1
    b = b.strip('0').rstrip('0')
    a = b[0]
    b = b[1:]
print(a,end='')
if len(b):
    print('.'+b,end='')
if l:
    print('E'+str(l))

		     	 			 				 	 			  				 	

s = input()
if '.' not in s:
    s = s + '.'
p, q = s.strip('0').split('.')
if not p:
    t = q.strip('0')
    e = len(t) - len(q) - 1
    l = t[0]
    r = t[1:]
else:
    e = len(p) - 1
    l = p[0]
    r = (p[1:] + q).rstrip('0')
if l:
    print(l, end = '')
else:
    print(0, end = '')
if r:
    print('.' + r, end = '')
if e:
    print('E%d' % e, end = '')

S=input()
beg = 0
end = len(S)

while beg < end and S[beg] == '0':
    beg += 1

if '.' in S:
    while beg < end and S[end-1] == '0':
        end -= 1

    if beg < end and S[end-1] == '.':
        end -= 1

if '.' in S:
    i=S.index('.')

if beg == end:
    print('0')
elif '.' in S and i < end:
    if i == beg and end-beg == 2:
        print("%sE-1" % S[beg+1])
    elif i == beg+1:
        print(S[beg:end])
    elif i > beg+1:
        print("%s.%s%sE%d" % (S[beg], S[beg+1:i], S[i+1:end], i-beg-1))
    else:
        c = -1
        beg += 1
        while beg < end and S[beg] == '0':
            beg += 1
            c -= 1

        print("%s%s%sE%d" % (S[beg], '.' if end-beg > 1 else '', S[beg+1:end], c))
elif end-beg == 1:
    print(S[beg])
else:
    l=end-beg
    while beg < end and S[end-1] == '0':
        end -= 1
    print("%s%s%sE%d" % (S[beg], '.' if end-beg > 1 else '', S[beg+1:end], l-1))




x = input()
pointindex = x.find('.')
if pointindex == -1:
    y = x.lstrip('0')
    print(y[0], end = '')
    e = len(y)-1
    z = y[1:].rstrip('0')
    if z != '':
        print('.' + z, end = '')
    if e:
        print('E' + str(e))
elif (x[:pointindex].lstrip('0') == ''):
    z = x[pointindex+1:].rstrip('0')
    for i in range(len(z)):
        if z[i] == '0':
            continue
        else:
            print(z[i], end = '')
            e = -(i+1)
            y = z[i+1:].rstrip('0')
            if y!='':
                print('.' + y + 'E' + str(e))
            else:
                print('E' + str(e))
            break
            
else:
    y = x[:pointindex].lstrip('0')
    print(y[0], end = '')
    e = len(y)-1
    z = (y[1:]+x[pointindex+1:]).rstrip('0')
    if z!='':
        print('.' + z, end = '')
    if e:
        print('E' + str(e))


s = input()
if not ('.' in s): s = s + '.'
a, b = s.strip('0').split('.')
if not a:
    newb = b.strip('0')
    poc, l, r = len(newb) - len(b) - 1, newb[0], newb[1:]
else:
    poc, l, r = len(a) - 1, a[0], (a[1:] + b).rstrip('0')
if l:
    print(l, end = '')
else:
    print(0, end = '')
if r: print('.' + r, end = '')
if poc: print('E%d' % poc, end = '')


s = input()

if not '.' in s:
	s = s + '.'

i = 0; zer = 0; step = 0
while s[i] == '0':
	zer += 1
	i += 1
s = s[zer:]
zer = 0

#print(s)

i = len(s) - 1
while s[i] == '0':
	zer += 1
	i -= 1
if zer > 0: s = s[:-zer]
'''if not '.' in s:
	step = zer
	s = s + '.'''


#print(s, step)

i = s.index('.')

if len(s[i:]) > 1 and i == 0:
	i += 1
	step -= 1
	while s[i] == '0':
		i += 1
		step -= 1
elif i == len(s) - 1:
	i -= 1
	while s[i] == '0':
		i -= 1
		step += 1		

i = s.index('.')
#print(s, step, i)

if len(s) == 2 and step == 0:
	print(s[0])
	#print('case 1')
elif len(s[:-step - 1]) == 1 and step > 0:
	print(s[0] + 'E' + str(step))
	#print('case 2')
elif len(s[:i]) == 1 and step == 0:
	print(s[0] + '.' + s[i + 1:])
	#print('case 3')
elif step == 0:
	print(s[0] + '.' + s[1:i] + s[i+1:] + 'E' + str(len(s[1:i])))  
	#print('case 4')
elif step > 0:
	print(s[0] + '.' + s[1:i - step] + s[i+1:] + 'E' + str(len(s[1:i - step]) + step))
	#print('case 5')
elif step < 0 and len(s[-step:]) == 1:
	print(s[-step] + s[-step + 1:] + 'E' + str(step))
	#print('case 6')
elif step < 0:
	print(s[-step] + '.' + s[-step + 1:] + 'E' + str(step))
	#print('case 7')























def main():
	s = input()
	print(solver(s))

def solver(s):
	s = s[firstNonLeadingZero(s):]
	dotIndex = s.find('.')
	result = None
	if dotIndex == -1:
		s += '.'
		dotIndex = len(s) - 1
		# if len(s) == 1:
		# 	return s
		# elif 
		# result = '{}.{}E{}'.format(s[0], s[1:], str(len(s) - 1))
		# return result

	s = s[:firstTrailingZero(s)]
	if dotIndex == 0:
		firstIndex = firstNonZeroDigit(s)
		if firstIndex == -1:
			return '0'
		else:
			if firstIndex == len(s) - 1:
				result ='{}E{}'.format(s[firstIndex], -firstIndex)
			else:
				result ='{}.{}E{}'.format(s[firstIndex], s[firstIndex + 1:], -firstIndex)
	elif dotIndex == 1:
		if len(s) == 2:
			return s[0]
		else:
			return s
	else:
		digits = s[:dotIndex] + s[dotIndex + 1:]
		digits = digits[:firstTrailingZero(digits)]
		if digits[1:] == '0' * (len(digits) - 1):
			result ='{}E{}'.format(digits[0], dotIndex - 1)
		else:
			result ='{}.{}E{}'.format(digits[0], digits[1:], dotIndex - 1)
	return result

def firstNonZeroDigit(s):
	for i in range(len(s)):
		if s[i] not in ['.', '0']:
			return i
	return -1

def firstTrailingZero(s):
	index = len(s) - 1
	while s[index] == '0':
		index -= 1
	return index + 1

def firstNonLeadingZero(s):
	index = 0
	while s[index] == '0':
		index += 1
	return index

# print(solver("0016"))
# print(solver("001600"))
# print(solver("001600."))
# print(solver("0123.230"))
# print(solver("0123.230"))

# print(solver("01.23400"))
# print(solver(".100"))
#print(solver("0.0012"))
#print(solver("0001100"))
main()

def out(M, p):   
    if p==0:
        return M
    else:
        out='{0}E{1}'.format(M, p)
        return out
res=0
a=0
inp=list(str(input()))
for it in '123456789':
     if (it in inp)==True:
          res+=1
if res==0:
     res=-1
     print('0')
else: res=0     
while res==0:
          res-=1
          i=0
          k=0
          while inp[k]=='0':     
                  k+=1
          inp=inp[k:]          

          if inp[0]=='.':
                  inp.insert(0, '0')
          if inp[len(inp)-1]=='.':
                  inp.remove(inp[len(inp)-1])   

          if ('.' in inp)==True:
              while True:
                  if inp[i]!='.':
                      i+=1
                  else: break

              inp.reverse()
              k=0
              while inp[k]=='0':
                  k+=1
              inp=inp[k:]
              if inp[0]=='.':
                  inp.remove('.')
              inp.reverse()
              res-=1

              if ('.' in inp)==False:
                  i=len(inp)
                  inp.insert(1, '.')
                  inp.reverse()
                  k=0
                  while inp[k]=='0':
                        k+=1
                  inp=inp[k:]
                  while inp[0]=='.':
                        inp.remove('.')
                  inp.reverse()                                
                  inp=''.join(inp)
                  a-=1
                  print(out(inp, i-1))
              if ('.' in inp)==True and len(inp[:i])==1:
                  i=0     
                  if inp[0]=='0':
                      inp.remove('.')
                      k=0
                      while inp[i]=='0':
                          i+=1
                      inp=inp[i:]    
                      inp.insert(1, '.')
                  if inp[len(inp)-1]=='.':
                      inp.remove('.')
                  a=-1      
                  print(out(''.join(inp), -i))
              if ('.' in inp)==True and len(inp[:i])>1 and a==0:
                  inp.remove('.')
                  inp.insert(1, '.')
                  inp=''.join(inp)
                  print(out(inp, i-1))
           

          else:
              i=len(inp)
              inp.insert(1, '.')
              inp.reverse()
              k=0
              while inp[k]=='0':
                  k+=1
              inp=inp[k:]
              while inp[0]=='.':
                        inp.remove('.')
              inp.reverse()                                
              inp=''.join(inp)
              print(out(inp, i-1))