Defaults to 0 for blank or invalid input.