solve length of last word