```
class Solution(object):
def minCostClimbingStairs(self, cost):
"""
:type cost: List[int]
:rtype: int
"""
getThere = [0, 0]
for i in range(2, len(cost)):
getThere.append(min(getThere[i - 2] + cost[i - 2], getThere[i - 1] + cost[i - 1]))
return min(getThere[-2] + cost[-2], getThere[-1] + cost[-1])
```