CREATE TABLE table_name_40 (laps INTEGER, time_retired VARCHAR(255), grid VARCHAR(255))
In grid 15, how many laps were there before ending with a time of exhaust?
    
SQL: SELECT SUM(laps) FROM table_name_40 WHERE time_retired = "exhaust" AND grid < 15