Test your skills with this GMAT practice question!

Beth lives 40 blocks from her office. To get to work, she can walk, which takes 45 seconds per block, or she can take the subway, which takes z seconds per block. If she could wait for the subway for 20 minutes and arrive at her office at exactly the same time she would have arrived by walking, then z is