str = gets.chomp carry = str[0..2].to_i >= 995 if carry puts sprintf("%3.1f",str[0..2].to_f/1000)+"*10^"+(str.size).to_s else puts sprintf("%3.1f",str[0..2].to_f/100)+"*10^"+(str.size-1).to_s end