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_27 (grid INTEGER, driver VARCHAR, time_retired VARCHAR, laps VARCHAR)
### Question:
What is the sum of grids with an engine in Time/Retired with less than 45 laps for Giancarlo Baghetti?
### Answer:
SELECT SUM(grid) FROM table_name_27 WHERE time_retired = "engine" AND laps < 45 AND driver = "giancarlo baghetti"