Added if conditional to the problem considering the A grade.