An electric company charges its customers S0.0577 per kilowatt-hour (kwh) for the first 1000 kWh used, 0.0532 dollar for the next $4000 \mathrm{kWh},$ and 0.0511 dollar for any kWh over 5000 . Find a piecewise-defined function $C$ for a customer's bill of $x$ kWh.