From Nietzsche

He who has a why can bear almost any how