In fact, sheep are surprisingly smart.