Compute total size