Magician

Five cards labelled A, B, C, D and E are in a pile on a table in some order.

1. A magician takes the top card and places it at the bottom of the pile.

2. He then takes the next card and lays it on the table to form the beginning of a row.

3. He then takes the next card and places it at the bottom of the pile.

4. He then takes the next card and places it at the right end of the row.

5. He repeats steps 3 and 4 until he has all the cards in the row.

Question:

If they are now in the order ABCDE, what was the bottom card in the original pile?