Grass Seed Inc.

Given the cost per square metre and a list of rectangular lawns, print the total cost of seeding all of them, rounded to seven decimals.

Easy1MathImplementationInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

Years ago, after another wasted day in an office cubicle fighting one more buzzword-filled JavaScript framework, Janice the engineer looked out of the window and decided it was time for a change. She traded her keyboard and mouse for a pitchfork and a spade and started a gardening company.

After years of outdoor work Janice runs the largest landscaping company in the South West, and she has just won a large contract to sow lawns for wealthy landowners. Each contract lists the size of every lawn that needs seeding and the price of the seed for one square metre. Work out how much the seed costs in total.

Every lawn is a rectangle, so its area is its width times its length.

Input

The first line contains a real number CC (0<C1000 < C \le 100), the cost of sowing one square metre of lawn.

The second line contains an integer LL (0<L1000 < L \le 100), the number of lawns to sow.

Each of the next LL lines contains two real numbers, the width wiw_i (0wi1000 \le w_i \le 100) and the length lil_i (0li1000 \le l_i \le 100) of one lawn.

Output

Print the total cost of sowing all the lawns on one line, rounded to seven decimal places. Always print all seven digits after the decimal point, padding with zeros when needed.

No input puts the exact value exactly on a rounding boundary.