Market Order - Confusion!

Suppose i am placing a market order for buying 1 stock of XYZ co. at what price i will get the share ? for example if these are the best five Ask price and in case of Selling the opposite holds correct ?

Sl No Ask Price Ask Quantity Number of Sellers
01 3294.80 1 1
02 3294.85 1 1
03 3295.00 1 1
04 3296.20 1 1
05 3296.25 1 1

Hi

The following will be ur Price subject to the condition that the best 5 Ask Price & Qty not Changed till ur order Execution

If U Place a Mkt Buy Order with Qty 1 then Ur Buy price will be 3294.80 (Ist Ask Price)

If U Place a Mkt Buy Order with Qty 2 then Ur Avg Buy price will be 3294.825​ (Avg Of Ist & 2nd Ask Price)

If U Place a Mkt Buy Order with Qty 3 then Ur Avg Buy price will be 3294.883 (Avg Of Ist , 2nd & 3rd Ask Price)

If U Place a Mkt Buy Order with Qty 4 then Ur Avg Buy price will be 3295.213​ (Avg Of Ist , 2nd, 3rd & 4th Ask Price)​

If U Place a Mkt Buy Order with Qty 5 then Ur Avg Buy price will be 3295.42 (Avg Of Ist , 2nd, 3rd , 4th & 5th Ask Price)​

...

In General Ur Order will be Filled from The Top of the Table

Suppose U placed a Mkt Buy Order with 5 Qty & in the above Ask Table..The Ist Ask Qty is 5 then 

Ur Buy Price will be 3294.80 only

....

Same U Place a Mkt Sell Order...