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

### Instruction:
what is the highest u.s. rank when the foreign total s ton is more than 703,638, the year is earlier than 2005, the foreign imports s ton is 284,347 and the foreign exports s ton is smaller than 478,317?

### Inputs:
table_name: table, columns: ['Year', 'U.S. Rank', 'Total s Ton', 'Domestic s Ton', 'Foreign Total s Ton', 'Foreign Imports s Ton', 'Foreign Exports s Ton']

### Response:
SELECT MAX U.S. Rank FROM table WHERE Foreign Total s Ton > 703,638 AND Year < 2005 AND Foreign Imports s Ton = 284,347 AND Foreign Exports s Ton < 478,317