solved first project euler problem