"having a BMI between 30 and 35 shortened life by an average of 0–1 years, having a BMI between 35 and 40 shortened life by 1–3 years, and having a BMI above 40 shortened life by 1–7 years"
(This is easily googlable, I don't want to turn this message into a journal article)
Note that the error bars on the effect are quite large (1 to 7 years even for extreme obesity). Now it's true that a lot of things hide in an "average", and there is a lot to discuss here, and I am definitely not discouraging anybody from acquiring healthy habits and lifestyle, but... it's just not a simple story of reward for virtue and punishment for sins. Genetic factors which we have no control over probably have a greater effect. Which is not a story that people want to hear.