Calculation of final momentum