BMI 41 and scheduled c section πŸ˜”

I weighed 224 pounds pre pregnancy. I had lost 35 pounds to get there through diet and exercise. I fell pregnant and whilst I exercised up until 28 wks and ate relatively healthy for the whole pregnancy I am now 271 pounds. I have to have a c section due to previous complications and my BMI is 41 which puts me into the high risk category. I am scared and ashamed. Did anybody else have similar numbers and have a positive experience?