Compute max_era more simply