who invented the mechanical adding machine