Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,cnt;
void search(long number,int three,int five,int seven){
    if(number<=n){
        if(three&&five&&seven)cnt++;
        search(number*10+3,1,five,seven);
        search(number*10+5,three,1,seven);
        search(number*10+7,three,five,1);
    }
}
int main(){
    cin>>n;
    search(0,0,0,0);
    cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: warning: ignoring return value of '_FIter1 std::search(_FIter1, _FIter1, _FIter2, _FIter2) [with _FIter1 = int; _FIter2 = int]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |     search(0,0,0,0);
      |     ~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4090:5: note: declared here
 4090 |     search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
      |     ^~~~~~
In file included from /usr/include/c++/14/algorithm:60:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of '_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = int; _Predicate = __gnu_cxx::__ops::_Iter_equals_iter<int>]':
/usr/include/c++/14/bits/stl_algobase.h:2203:23:   required from '_ForwardIterator1 std::__search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate) [with _ForwardIterator1 = int; _ForwardIterator2 = int; _BinaryPredicate = __gnu_cxx::__ops::_Iter_equal_to_iter]'
 2203 |         return std::__find_if(__first1, __last1,
      |                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
 2204 |                 __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4102:27:   required from '_FIter1 std::search(_FIter1, _FIter1, _FIter2, _FIter2) [with _FIter1 = int; _FIter2 = int]'
 4102 |       return std::__search(__first1, __last1, __first2, __last2,
      |              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4103 |                            __gnu_cxx::__ops::__iter_equal_to_iter());
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:11:   required from here
   14 |     search(0,0,0,0);
      |     ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:2153:48: error: no matching function for call to '__iterator_category(int&)'
 2153 |                        std::__iterator_category(__first));
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:65:
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note: candidate: 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&)'
  239 |     __iterator_category(const _Iter&)
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_iterator_base_types.h: In substitution of 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&) [with _Iter = int]':
/usr/include/c++/14/bits/stl_algobase.h:2153:34:   required from '_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = int; _Predicate = __gnu_cxx::__ops::_Iter_equals_iter<int>]'
 2153 |                        std::__iterator_category(__first));
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:2203:23:   required from '_ForwardIterator1 std::__search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate) [with _ForwardIterator1 = int; _ForwardIterator2 = int; _BinaryPredicate = __gnu_cxx::__ops::_Iter_equal_to_iter]'
 2203 |         return std::__find_if(__first1, __last1,
      |                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
 2204 |                 __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4102:27:   required from '_FIter1 std::search(_FIter1, _FIter1, _FIter2, _FIter2) [with _FIter1 = int; _FIter2 = int]'
 4102 |       return std::__search(__first1, __last1, __first2, __last2,
      |              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4103 |                            __gnu_cxx::__ops::__iter_equal_to_iter());
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:11:   required from here
   14 |     search(0,0,0,0);
      |     ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: error: no type named 'iterator_category' in 'struct std::iterator_traits<int>'
  239 |     __iterator_category(const _Iter&)
      |     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:71:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_equal_to_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]':
/usr/include/c++/14/bits/stl_algobase.h:2223:22:   required from '_ForwardIterator1 std::__search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate) [with _ForwardIterator1 = int; _ForwardIterator2 = int; _BinaryPredicate = __gnu_cxx::__ops::_Iter_equal_to_iter]'
 2223 |           while (__predicate(__current, __p))
      |                  ~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4102:27:   required from '_FIter1 std::search(_FIter1, _FIter1, _FIter2, _FIter2) [with _FIter1 = int; _FIter2 = int]'
 4102 |       return std::__search(__first1, __last1, __first2, __last2,
      |              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4103 |                            __gnu_cxx::__ops::__iter_equal_to_iter());
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:11:   required from here
   14 |     search(0,0,0,0);
      |     ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:117:16: error: invalid type argument of unary '*' (have 'int')
  117 |       { return *__it1 == *__it2; }
      |                ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:117:26: error: invalid type argument of unary '*' (have 'int')
  117 |       { return *__it1 == *__it2; }
      |                          ^~~~~~