Quantitative approach to creativity