idiot-savanted

adj.

Still drunk, and remarkably capable of calculating the bill while failing to locate breakfast.

Shalo was idiot-savanted, dividing the expenses precisely before losing the receipt.

Source: Wiktionary