50K of short-term gains are entirely offset by your long-term losses. 3K limitation applies after that offset (you can't deduct more than 3K a year).