------
## 最终结论
```python
def canCompleteCircuit(gas, cost):
    if sum(gas) < sum(cost):
        return -1

    total_tank = 0
    current_tank = 0
    starting_station = 0

    for i in range(len(gas)):
        total_tank += gas[i] - cost[i]
        current_tank += gas[i] - cost[i]

        if current_tank < 0:
            starting_station = i + 1
            current_tank = 0

    return starting_station

# Example usage:
gas1 = [1,2,3,4,5]
cost1 = [3,4,5,1,2]
print(canCompleteCircuit(gas1, cost1))  # Output: 3

gas2 = [2,3,4]
cost2 = [3,4,3]
print(canCompleteCircuit(gas2, cost2))  # Output: -1
```