Implemented the solutio for the Kevin Bacon Number