The Russian Peasant Multiplication Algorithm: A Generalization