the years of the edain were lengthened , according to the reckoning of men , after their coming to beleriand ; but at last beor the old died when he had lived three and ninety years , for four and forty of which he had served king felagund .