a bit trick about math problem, solve it perfectly, very goooooooooood