Another solution

I got 11 by a lucky guess, but then implemented a solution anyways