Integer optimization with penalized fractional values: The Knapsack case