After all necessary expenses have been paid or provided for, the stockholders shall be entitled to receive an annual dividend of six per centum on the paid in capital stock, which dividend shall be cumulative. After all such dividend claims have been fully met, all the net earnings shall be paid to the United States as a franchise tax, except that one-half of such net earnings shall he paid into a surplus fund until it shall amount to forty per centum of the paid in capital stock of such bank.