Count the Trains

Problem Name:
Count the Trains
Site:CodeForces
Links:
Tags:
Problem setters: