Andy and Devin together earned $50. Andy's share was 4 times as big as Devin's share. If Andy spends $23 at the store, how much money will Andy have left?

4x+x = 50

so, Andy had $40 at first.
40-23 = ____