Then, the below equation holds for no deadlock.

$2(n-3) + 5 + 1 = 10$

$\implies 2n - 6 + 6 = 10$

$\therefore n = 5$

Is it the correct answer?