Final version of "Bellman-Ford alghoritm"