Extracting constant for magic strings