When a train started from station A, there were certain number of passengers in it. On the next station 111 of these passengers got down and 20% of these got down passengers got into the train. Now if the number of passengers in the train is 510, how many passengers were there at station A?