5898877 in words is written as :

Five Million Thousand Eight Hundred and Seventy Seven