n = int(input())
total = 0
for i in range(n):
into = input()
q, y = into.split(' ')
total = float(y)*float(q) + total
print(total)