Maggie had a number of identical flowers for sale. She sold 70 of them with a 50% loss and sold the rest with a 80% profit. On the whole, Maggie still made a 10% profit. How many flowers did Maggie have at the beginning?