adding russian peasant algorithm