import sys n = int(sys.stdin.readline()) qaly = 0.0 for _ in range(n): q, y = sys.stdin.readline().split(' ') qaly += float(q) * float(y) print(qaly)