$(':not(.block2) .block3, > .block3', '.block1');
<!DOCTYPE HTML>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
</head>
<body>
<div class="block1">
<div class="block2">
<div class="block3"></div>
</div>
<div class="block3"></div>
<div>
<div class="block3"></div>
</div>
</div>
<div class="block1">
<div class="block2">
<div class="block3"></div>
</div>
<div class="block3"></div>
<div>
<div class="block3"></div>
</div>
</div>
<script>
var b = $(':not(.block2) .block3, > .block3', '.block1');
alert(b.length);
</script>
</body>
</html>