A bakery sells taro, red bean and green tea pues. 65% of the pies are taro pies. 40% of the remaining pies are red bean pies. How many pies are there altogether?​