Estimating direct and indirect losses due to earthquake damage in residential RC buildings