See the tutorial: http://www.avast.com/files/tutorials/insert_key.htm
Please take a look here: http://www.avast.com/eng/faq-invalid-license-number.html

Is your system date/time correct?
Do you use copy & paste method?
Are you sure you do not include the ‘last blank space’ in the paragraph while copying & pasting?

Please, post the last 100-150 lines of avast log: C:\Program Files\Alwil Software\Avast4\DATA\log\Setup.log