Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
using ll = long long;
using namespace std;
#define P pair<int, int>
int main(){
    ll n , a , b , c , d , e ;
    cin >> n >> a >> b >> c >> d >> e ;

    ll ans = 0 ;
    ll s;
    s = min(a , b , c , d , e );

    if(n / s == 0){
    cout << (n / s)+4 << endl; ;
    }else{
        cout << (n /s) + 5 << endl;
    }
    /* ll nowa = n,nowb  = 0, nowc  = 0,nowd=0 , nowe=0 ;
    
   while(nowa > 0 ||nowb > 0 || nowc > 0||nowd > 0 ||nowe > 0){

       if(nowe >= e){
           
            nowe -=e ;
       }else if(nowe > 0){
            nowe = 0; 
       }

       if(nowd >= d){
            nowe +=d ;
            nowd -=d ;
       }else if(nowd > 0){
            nowe += nowd ;
            nowd = 0 ; 
       }

        if(nowc >= c){
            nowd +=c ;
            nowc -=c ;
       }else if(nowc > 0){
            nowd += nowc ;
            nowc = 0 ; 
       }

       if(nowb >= b){
            nowc +=b ;
            nowb -=b ;
       }else if(nowb > 0){
            nowc += nowb ;
            nowb = 0 ; 
       }

       if(nowa >= a){
            nowb +=a ;
            nowa -=a ;
       }else if(nowa > 0){
            nowb += nowa ;
            nowa =0 ; 
       }
      
      ans ++ ;
      cout << "now = " << ans << endl;
      cout << "a " << nowa << endl;
      cout << "b " << nowb << endl;
      cout << "c " << nowc << endl;
      cout << "d " << nowd << endl;
      cout << "e " << nowe << endl;
      cout << endl;
   }*/

    
    cout << ans << endl;
    return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: no matching function for call to 'min(ll&, ll&, ll&, ll&, ll&)'
   12 |     s = min(a , b , c , d , e );
      |         ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 5 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 5 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 5 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 5 provided