Optimal Depth Neural Networks for Multiplication and Related Problems