import java.io.BufferedReader

import io.StdIn._
import scala.io.Source.stdin

object Main extends App {
  val otosidamaCount = readInt()
  val bReader   = new BufferedReader(stdin.reader())
  var readCount = 0
  var total: Double = 0
  do {
    val input = bReader.readLine().split(' ')
    val yen = new Price(input(0).toDouble, input(1)).toYen()
    total += yen
    readCount += 1
  } while(readCount < otosidamaCount)

  println(total)
}
