Integer constants written with a leading 0 are interpreted as octal (base-8), not decimal (base-10). This is analogous to 0x triggering hexadecimal (base-16) interpretation.
Basically all you can do here is not put leading 0s on your integer constants.