Solution: Let the total number of stones be 2n + 1, i.e., there are n stones to the left of middle stone and n to its right.
Since the man starts from one point, total distance travelled by him for collecting all stone to the middle stone is:

Therefore, number of stones = 2n + 1 = 2(12) + 1 = 25