We are given that:
\[
a \cos x + a \sin x + a = 2K + 1.
\]
This equation can be rewritten as:
\[
a (\cos x + \sin x) = 2K + 1 - a.
\]
We know that:
\[
\cos x + \sin x = \sqrt{2} \sin \left( x + \frac{\pi}{4} \right).
\]
Thus, the equation becomes:
\[
a \sqrt{2} \sin \left( x + \frac{\pi}{4} \right) = 2K + 1 - a.
\]
Since \( \sin \left( x + \frac{\pi}{4} \right) \) can take values between -1 and 1, we can analyze the equation:
\[
- a \sqrt{2} \leq 2K + 1 - a \leq a \sqrt{2}.
\]
Solving for \( K \), we get:
\[
K = \frac{a - 1 - \sqrt{2a}}{2} \quad {to} \quad \frac{a - 1 + \sqrt{2a}}{2}.
\]
Thus, the value of \( K \) lies in the interval:
\[
\boxed{ \frac{a - 1 - \sqrt{2a}}{2}, \frac{a - 1 + \sqrt{2a}}{2} }.
\]