from collections import defaultdict
import numpy as np
jolts = sorted(np.array(open('input.txt').read().strip().split('\n'), dtype
    =int))
jolts = [0] + jolts + [max(jolts) + 3]
print(jolts)
ways = defaultdict(int)
for value in jolts:
    ways[value] = sum(ways[value - delta] for delta in range(1, 4)
        ) if value else 1
print(ways[jolts[-1]])

f1dc76054dd2e41a5aac2a5fe366ba0ca10a419d
<mask token>

<mask token>
print(jolts)
<mask token>
for value in jolts:
    ways[value] = sum(ways[value - delta] for delta in range(1, 4)
        ) if value else 1
print(ways[jolts[-1]])

<mask token>
jolts = sorted(np.array(open('input.txt').read().strip().split('\n'), dtype
    =int))
jolts = [0] + jolts + [max(jolts) + 3]
print(jolts)
ways = defaultdict(int)
for value in jolts:
    ways[value] = sum(ways[value - delta] for delta in range(1, 4)
        ) if value else 1
print(ways[jolts[-1]])

from collections import defaultdict
import numpy as np
jolts = sorted(np.array(open('input.txt').read().strip().split('\n'), dtype
    =int))
jolts = [0] + jolts + [max(jolts) + 3]
print(jolts)
ways = defaultdict(int)
for value in jolts:
    ways[value] = sum(ways[value - delta] for delta in range(1, 4)
        ) if value else 1
print(ways[jolts[-1]])
