Dancing Queens

How many moves can the queens make?

Run 5

Input

_Q______
________
________
_____Q__
________
__Q_____
_Q______
________

Expected Output

83