a head for
The brainpower you need to survive something stupid.
You need a head for this madness.
He has a head for trouble, and it's usually mine.
She has a head for math, but not for my dumbass.
xs