No matter what food you eat in excess, you will gain weight.
No matter what food you eat, even if you eat ice cream once or twice occasionally, you will not gain weight at one time. The key is to count calories. Are food intake and consumption proportional to each other? If the ratio is positive, you won’t be fat; if it’s negative, you’ll be thin; if it’s too high, you’ll be fat