Below is an context that describes a sql query, paired with an question that provides further information. Write an answer that appropriately completes the request.  # noqa: E501
### Context:
CREATE TABLE table_name_61 (gold INTEGER, rank VARCHAR, silver VARCHAR, nation VARCHAR)
### Question:
How many gold medals for Bulgaria (BUL) with 2 silvers and a less than 18 rank?
### Answer:
SELECT SUM(gold) FROM table_name_61 WHERE silver = 2 AND nation = "bulgaria (bul)" AND rank < 18