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

### Instruction:
What is the rank of a country with more than 2 gold, less than 5 silver, and less than 31 total medals?

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

### Response:
SELECT SUM Rank FROM table WHERE Gold > 2 AND Total < 31 AND Silver < 5