Consider the function f(x) = tan(sin(x)) - sin(tan(x)) + cos(x)^5 - 0.5 defined on the interval [a, b], and n*b ≥ 1 a series of subintervals [x_i, x_{i+1}], i = 1, n*b, where x_1=a and x_{n*b+1}=b. Find the number of subintervals that contain "observable" roots of f(x). A root in a subinterval [x_i, x_{i+1}] is "observable" if the existence of that root can be decided without inspecting the behavior of f(x) for x_i < x < x_{i+1} i.e. a subinterval is a black box and you cannot, compute inside the interval.
The program input is from a text file. Each data set in the file stands for a particular interval [a, b] of f(x) and specifies the limits a, b (real numbers) and the integer number nb of subintervals.
The input data are correct and terminate with an end of file. An input/output sample for the function f(x)=1-x^2 is in the table bellow.
For each data set the program prints the number of subintervals that contain "observable" roots of f(x). Each result is printed on the standard output from the beginning of a line.