#encoding:utf-8 No.0055 2014.10.8
while true
  num = gets.chomp.to_f
  if num == 0.0
    break
  end

  sum = num
  i = 1

  while i < 10
    i += 1
    if i%2 == 0
      num = num*2
      sum += num
    else
      num = num/3
      sum += num
    end
  end

  printf("%.8f\n",sum)
end