Let \( \vec{c} \) be a vector perpendicular to the vectors \( \vec{a}=\hat{i}+\hat{j}-\hat{k} \) and \( \vec{b}=\hat{i}+2\hat{j}+\hat{k} \). If \( \vec{c}\cdot(\hat{i}+\hat{j}+3\hat{k})=8 \) then the value of \( \vec{c}\cdot(\vec{a}\times\vec{b}) \) is equal to ________ .