Algorithm work with karatsuba