Juan had some pieces of gum. He gave 23 pieces to his brother. His sister then gave him 5 more pieces. Now he has 39 pieces of gum. How many pieces of gum did Juan start with.