Conversion and calculation problem