Balancing equations with subscripted elements