Thanks, SafeSurf
but I alredy tried to uninstall Avast by using Avast Uninstall Utility (avastclear.exe) and install it once again, the result was the same. I also tried to make fresh install of Avast on a system where Avast has never been installed and I got the same message that the code I inputed is invalid.
So I have no idea what to do.