You need to try and get an average of less than three, then you win
I used some insparation from a book, but I redid the coding. hope you enjoy!