finding the value c that makes the function continous