Exercise your brain with this number puzzle. Following the logic used in the first three diagrams, fill in the missing number in the fourth diagram.