Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextFloat64() (float64, error) {
	return strconv.ParseFloat(nextString(), 64)
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := 5
	array := make([]float64, n)
	for i := 0; i < n; i++ {
		array[i], _ = nextFloat64()
	}

	// fmt.Println(array)
	fmt.Println(int(array[0] - math.Ceil(math.Max(array[1]/array[3], array[2]/array[4]))))
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int l,a,b,c,d;
  cin>>l>>a>>b>>c>>d;
  cout<<l-max((a+c-1)/c,(b+d-1)/d)<<endl;


}

C++: #include<iostream>
using namespace std;

int main(){
	int L,A,B,C,D,x,y;
	cin >>L >>A >>B >>C >>D;
	if(A%C==0)
		x=A/C;
		else
			x=A/C+1;
	if(B%D==0)
		x=B/D;
		else
			x=B/D+1;
		
	cout << L-(x+y);

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<cstring>
#include<set>
#include<map>
#include<vector>
#include<cmath>
#include<queue>
#include<cstdio>
#include<cstdlib>
#define reep(n1,n2,n3) for(int n1=n3;n1<n2;n1++)
#define rep(n1,n2) reep(n1,n2,0)
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define INF 1e9
using namespace std;
typedef long long int lint;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<pair<int,int> > vp;
typedef pair<int,int> pi;
typedef pair<int,pair<int,int> > pii;
typedef vector<string> vs;
const double PI  = acos(-1.0);
int main(){
    int a,b,c,d,l;
    cin>>l>>a>>b>>c>>d;
    cout<<l-max((a+c-1)/c,(b+d-1)/d)<<endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
using namespace std;
typedef long long ll;
int L,A,B,C,D;
int main(){
  scanf("%d %d %d %d %d",&L,&A,&B,&C,&D);
  int res=0;
  for(int i=0;i<L;i++){
    if(A<=0 && B<=0) res++;
    A-=C;
    B-=D;
  }
  printf("%d\n",res);
}

C++: #include<iostream>
#include<algorithm>
int main() {
	int L, A, B, C, D;
	std::cin >> L >> A >> B >> C >> D;
	std::cout << L - std::max(A / C, B / D) << std::endl;
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int L, A, B, C, D;
	int i, j;
	
	 scanf("%d %d %d %d %d", &L, &A, &B, &C, &D);
	 
	 i = 0;
	 while (1){
	 	
		if (A <= 0 && B <= 0){
			break;
	 	}
		A -= C;
		B -= D;
		i++;
	 }
	 
	 L -= i;
	 
	 printf("%d\n", L);
	 
	 return (0);
}

C++: #include<iostream>
using namespace std;
int main(void)
{
    int L,A,B,C,D;
    cin>>L>>A>>B>>C>>D;
    if(A/C>=B/D&&A%C!=0)cout<<L-(A/C+1)<<"1\n";
    else if(A/C<B/D&&B%D!=0)cout<<L-(B/D+1)<<"2\n";
    else if(A/C>=B/D)cout<<L-A/C<<"3\n";
    else cout<<L-B/D<<"4\n";
}

C++: #include<iostream>
#define max(a,b) a>b?a:b
main(){int L,A,B,C,D;std::cin>>L>>A>>B>>C>>D;std::cout<<L-max(A%C?A/C+1:A/C,B%D?B/D+1:B/D)<<'\n';}

C++: #include <iostream> 
using namespace std;

int main(){

int huyuyasumi_nissu;
int kokugo_page;
int sansu_page;
int kokugo_a_day;
int sansu_a_day;
int kokugo_kakaru_day;
int sansu_kakaru_day;

cin>> huyuyasumi_nissu>>kokugo_page>> sansu_page>>kokugo_a_day>>sansu_a_day;

if(kokugo_page % kokugo_a_day == 0) {
	kokugo_kakaru_day = kokugo_page / kokugo_a_day;
	}else{
	kokugo_kakaru_day = kokugo_page / kokugo_a_day + 1;
	}

if(sansu_page % sansu_a_day == 0) {
	sansu_kakaru_day = sansu_page / sansu_a_day;
	}else{
	sansu_kakaru_day = sansu_page / sansu_a_day + 1;
	}

if( kokugo_kakaru_day > sansu_kakaru_day ) {
 	cout << huyuyasumi_nissu - kokugo_kakaru_day << endl;
	}else{
	cout << huyuyasumi_nissu -  sansu_kakaru_day << endl;
	}

return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int x ,y ,ja ,ma ,days;
  cin >> days >> x >> y >> ja >> ma;
  while( x > 0 || y > 0 ){
    x -= ja;
    y -= ma;
    days--;
  }
  cout << days << endl;
}