Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
How many gold medals for Bulgaria (BUL) with 2 silvers and a less than 18 rank?

### Inputs:
table_name: table, columns: ['Rank', 'Nation', 'Gold', 'Silver', 'Bronze', 'Total']

### Response:
SELECT SUM Gold FROM table WHERE Silver = 2 AND Nation = bulgaria (bul) AND Rank < 18