A leading 0 means the value will be interpreted as octal representation

To avoid this, just call to_i before %