Your friend has invited you to a party, and tells you to meet them in the line to get in. The one problem is it's a masked party. Everyone in line is wearing a colored mask, including your friend. Find which people in line could be your friend.
Your friend has told you that he will be wearing a `RED` mask, and has **TWO** other friends with him, both wearing `BLUE` masks.
Input to the function will be an array of strings, each representing a colored mask. For example:
```python
line = ['blue','blue','red','red','blue','green']
```
The output of the function should be the number of people who could possibly be your friend.
```python
friend_find(['blue','blue','red','red','blue','green','chipmunk'])  # return 1
```
def friend_find(line):
    N = len(line)
    A = lambda i: line[i] == "red" and B(i)
    B = lambda i: C(i) or D(i) or E(i)
    C = lambda i: i < N-2 and line[i+1] == line[i+2] == "blue"
    D = lambda i: 0 < i < N-1 and line[i-1] == line[i+1] == "blue"
    E = lambda i: 1 < i and line[i-2] == line[i-1] == "blue"
    return sum(map(A, range(N)))
def friend_find(line):
    N = len(line)
    A = lambda i: line[i] == "red" and B(i)
    B = lambda i: C(i) or D(i) or E(i)
    C = lambda i: i < N-2 and line[i+1] == line[i+2] == "blue"
    D = lambda i: 0 < i < N-1 and line[i-1] == line[i+1] == "blue"
    E = lambda i: 1 < i and line[i-2] == line[i-1] == "blue"
    return sum(map(A, range(N)))