The Optimal Quantity of CBDC in a Bank-Based Economy