An upper bound for the nonsolvable length of a finite group in terms of its shortest law