Base case of 0 regarding

How base case of 0 would 1, it should be 0 because if they are no friends there is no way, right