I need serious help here!!!

Damage Formula = (((((((Level × 2 ÷ 5) + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def) × Mod1) + 2) × CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3

This is the formula in question and i'm trying to set it up to solve for a specific variable (like CH or something). However, "It should be immediately mentioned that after successfully performing an operator (an operator being +, -, × or ÷), you need to "round down" the number to the nearest whole number before performing the next one."

How do I effectively set it up so it does the rounding correctly?