first day: changed input and solve function