Added cfg.py: code to calculate C-value.