Your task is to determine how many files of the copy queue you will be able to save into your Hard Disk Drive. The files must be saved in the order they appear in the queue. 

### Input:

* Array of file sizes `(0 <= s <= 100)`
* Capacity of the HD `(0 <= c <= 500)`

### Output:

* Number of files that can be fully saved in the HD. 

### Examples:

```
save([4,4,4,3,3], 12) -> 3
# 4+4+4 <= 12, but 4+4+4+3 > 12
```

```
save([4,4,4,3,3], 11) -> 2
# 4+4 <= 11, but 4+4+4 > 11
```

Do not expect any negative or invalid inputs.

Difficulty: EASY
Starter code: def save(sizes, hd):
	

Solutions:
def save(sizes, hd):
	for (i, s) in enumerate(sizes):
		if hd < s:
			return i
		hd -= s
	return len(sizes)


def save(sizes, hd):
	return save(sizes[:-1], hd) if sum(sizes) > hd else len(sizes)


from bisect import bisect
from itertools import accumulate

def save(sizes, hd):
	return bisect(list(accumulate(sizes)), hd)


from itertools import *

def save(sizes, hd):
	return sum((1 for _ in takewhile(hd.__ge__, accumulate(sizes))))


def save(sizes, hd):
	return sum((1 for i in range(len(sizes)) if sum(sizes[:i + 1]) <= hd))


def save(sizes, hd):
	ab = 0
	sum = 0
	for i in sizes:
		sum = sum + i
		if sum > hd:
			return ab
		ab += 1
	print(ab)
	return ab


from itertools import accumulate

def save(sizes, hd):
	i = 0
	for (i, acc) in enumerate(accumulate(sizes), 1):
		if acc > hd:
			return i - 1
	return i


def save(s, hd):
	return len([k for (i, k) in enumerate(s) if sum(s[:i + 1]) <= hd])


def save(sizes, hd):
	maxsize = 0
	copies = 0
	for i in range(len(sizes)):
		maxsize += sizes[i]
		copies += 1
		if maxsize > hd:
			return i
	return copies