private static int counter1 = 0;
private static int counter2 = 0;
private static int counter3 = 0;
public static void Main()
BigInteger x = BigInteger.Parse("1685287499328328297814655639278583667919355849391453456921116729");
BigInteger y = BigInteger.Parse("7114192848577754587969744626558571536728983167954552999895348492");
var result = multiply(x, y);
Console.WriteLine(counter1 );
Console.WriteLine(counter2 );
Console.WriteLine(counter3 );
Console.WriteLine(result );
public static BigInteger multiply(BigInteger x,BigInteger y)
int N = Math.Max(size1, size2);
BigInteger m = BigInteger.Pow(10, N);
Console.WriteLine("first number");
Console.WriteLine("second number");
BigInteger z0 = multiply(a, c);
BigInteger z1 = multiply(b, d);
BigInteger z2 = multiply(a + b, c + d);
BigInteger ad_bc = (z2 - z1 - z0);
Console.WriteLine("Sum ad + bc = " + ad_bc );
var pow = BigInteger.Pow( 10 ,N * 2);
result = ( pow * z0) + z1 + (ad_bc * m);
public static int GetSize(BigInteger num)