Но стоило им подойти к лестнице, ведущей на третий этаж...

How would you translate into English the word "стоило";
the standard definitions of "cost, worth, deserve" just do not seem to fit in this expression.