3987 in words is written as :

Three Thousand Nine Hundred and Eighty Seven