1) { if (substr_count($s, "3") == strlen($s) - 1 && substr($s, 0, 1) == "1") { echo substr_count($s, "3", 1).PHP_EOL; } else { echo "-1".PHP_EOL; } } else { echo "-1".PHP_EOL; } ?>