------
## 最终结论
```python
def fruit_distribution(s,n):
    # Extract the number of apples and oranges from the string
    parts = s.split(' ')
    apples = int(parts[0])  # First part is the number of apples
    oranges = int(parts[3])  # Fourth part is the number of oranges
    
    # Calculate the number of mangoes
    mangoes = n - apples - oranges
    return mangoes
```