Sturmian words and the Stern sequence