Multiplication trick for fast calculation