A new formula for the minimum distance of an expander code