int mul(int * arr, int N, int shift = 0)
{
switch (N)
{
case 1:
return arr[shift];
break;
case 2:
return (arr[shift] * arr[shift + 1]);
break;
default:
int M = N / 2;
return (mul(arr, M, shift) * mul(arr, N - M, shift + M));
}
}