Consider an acute triangle $ABC$ of area $S$. Let $CD \perp AB$ ($D \in AB$),  $DM \perp AC$ ($M \in AC$) and $DN \perp BC$ ($N \in BC$). Denote by $H_1$ and $H_2$ the orthocentres of the triangles $MNC$, respectively $MND$. Find the area of the quadrilateral $AH_1BH_2$ in terms of $S$.
1. **Identify the orthocenters and their properties:**
   - Given that \( H_2 \) is the orthocenter of triangle \( MND \), we have \( H_2M \perp DN \) and \( H_2N \perp DM \).
   - Since \( NC \perp DN \) and \( H_2M \perp DN \), it follows that \( H_2M \parallel NC \).
   - Similarly, since \( MC \perp DM \) and \( H_2N \perp DM \), it follows that \( H_2N \parallel MC \).
   - Therefore, \( H_2MCN \) forms a parallelogram.

2. **Determine the midpoint properties:**
   - Let \( T \) be the intersection of \( H_2C \) and \( MN \). Since \( H_2MCN \) is a parallelogram, \( T \) is the midpoint of both \( MN \) and \( H_2C \).

3. **Analyze the parallelogram \( DMH_1N \):**
   - Since \( MH_1 \parallel DN \) and \( NH_1 \parallel DM \), \( DMH_1N \) is also a parallelogram.
   - Thus, \( T \) is also the midpoint of \( DH_1 \).

4. **Form the parallelogram \( H_2H_1CD \):**
   - Since \( T \) is the midpoint of both \( H_2C \) and \( DH_1 \), \( H_2H_1CD \) forms a parallelogram.
   - This implies \( H_2H_1 = DC \) and \( H_2H_1 \parallel DC \), which means \( H_2H_1 \perp AB \).

5. **Calculate the area of quadrilateral \( AH_1BH_2 \):**
   - The area of quadrilateral \( AH_1BH_2 \) can be calculated as:
     \[
     [AH_1BH_2] = \frac{H_2H_1 \cdot AB}{2}
     \]
   - Since \( H_2H_1 = DC \), we have:
     \[
     [AH_1BH_2] = \frac{DC \cdot AB}{2}
     \]
   - Given that the area of triangle \( ABC \) is \( S \), we know:
     \[
     S = \frac{CD \cdot AB}{2}
     \]
   - Therefore:
     \[
     [AH_1BH_2] = S
     \]

The final answer is \( \boxed{ S } \).