Second Problem Solution