Mental arithmetic using neural networks