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<cmath>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	int a,b,c,d,l;
	cin>>l>>a>>b>>c>>d;
	int la=a/c,ma=b/d;
	if(a%c!=0)la++;
	if(b%d!=0)ma++;
	cout<<l-max(la,ma)<<endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <stdio.h>
#include <numeric>
#include <algorithm>
#include <math.h>
using namespace std;
int main(){
    double l,a,b,c,d;
    cin>>l>>a>>b>>c>>d;
    cout<<l-max(ceil(a/c),ceil(b/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)
		y=B/D;
		else
			y=B/D+1;
	if(x<y)
		x=y;
		
	cout << L-x <<endl";

	return 0;
}

C++: #include<iostream>
#include<algorithm>

using namespace std;

int main() {
  int l, a,b,c,d,i,j;
  i = j = 0;
  cin >> l >> a >> b >> c >> d;
  while(a>0){
    a-=c;i++;
  }
  while(b>0){
    b-=d;j++;
  }
  
  cout <<  l -  max(i, j)  << endl;

  return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

const double PI = 3.14159265358979323846;

int main() {
    int l, a, b, c, d;
    cin >> l >> a >> b >> c >> d;

    int hJ = (a / c);
    hJ += ((a % c) != 0) ? 1 : 0;
    int hM = (b / d);
    hM += ((b % d) != 0) ? 1 : 0;
    int hr = (hJ < hM) ? hM : hJ;

    cout << l - hr << endl;

    return 0;
}

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

int main(void){

  int l,a,b,c,d,res1,res2;

  cin >> l >> a >> b >> c >> d;

  res1 = a / c;
  res2 = b / d;
  
  res1 += (a % c != 0)? 1 : 0;
  res2 += (b % d != 0)? 1 : 0;

  l -= (res1 < res2)? res2 : res1;

  cout << l << endl;
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int L,A,B,C,D;
	int count;
	int count1;

	count=0;
	count1=0;
	
	scanf("%d %d %d %d %d",&L,&A,&B,&C,&D);
		while(0<A){
			A-=C;
			count++;
		}
		while(0<B){	
			B-=D;
			count1++;
		}
				if(count>count1){
					printf("%d\n",L-count);
				}
				else if(count=count1){
					printf("%d\n",L-count);
				}
				else{
					printf("%d\n",L-count1);
				}
	return 0;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int L, A, B, C, D;

int main()
{
    while (cin >> L) {
        cin >> A >> B >> C >> D;
        int kokugo = A / C;
        int sansuu = B / D;

        if (A % C != 0)
            kokugo++;
        if (B % C != 0)
            sansuu++;

        cout << L - max(kokugo, sansuu) << endl;
    }

    return 0;
}

C++: #include <cstdio>
#include <algorithm>

using namespace std;

int main(){
	int L,a,b,c,d; scanf("%d%d%d%d%d",&L,&a,&b,&c,&d);
	printf("%d\n",L-max((a+c-1)/c,(b+d-1)/d));
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

int L, A, B, C, D;

int main()
{
    cin >> L >> A >> B >> C >> D;
    int kokugo = ceil(A / C);
    int sansuu = ceil(B / D);

    cout << L - max(kokugo, sansuu) << endl;

    return 0;
}

C++: /*
	0576:Homework
*/
#include	<iostream>

using namespace std;

int main(void) {
	int L, A, B, C, D;
	int day;
	
	cin >> L >> A >> B >> C >> D;
	
	for(day = 1; (A > 0 && B > 0);) {
		if( A > 0 && B > 0 ) {
			A -= C;
			B -= D;
		} if(A <= 0 && B <= 0) {
			break;
		}
		day++;
		//cout << "[TEST]" << endl << "day:" << day << endl << "A:" << A << ", B:" << B << endl;
	}
	cout << L - day << endl;
	
	return 0;
}

C++: #include<iostream>

int main(){
	int L, A, B, C, D, j, m;
	std::cin >> L >> A >> B >> C >> D;
	j = A / C + (A % C > 0);
	m = B / D + (B % D > 0);
	std::cout << L - std::max(j, m) << std::endl;
}

C++: #include <bits/stdc++.h>

#define rep_(v, f, l) for (int v = (f), v##_ = (l); v < v##_; ++v)
#define rep(v, n) rep_(v, 0, n)
#define lep(v, n) rep_(v, 1, n + 1)
#define rrep_(v, f, l) for (int v = (l), v##_ = (f); v >= v##_; --v)
#define rrep(v, n) rrep_(v, 0, n - 1)
#define rlep(v, n) rrep_(v, 1, n)
#define show_a(a, size) rep(a##_it, size) std::cout << a[a##_it] << " \n"[a##_it == a##_it_ - 1];
#define show_v(v) show_a(v, v.size())
#define eachv(v, i) rep(i, v.size())
#define reachv(v, i) rrep(i, v.size())
#define debug(x) std::cerr << #x << " = " << x << "\n";

using namespace std;

typedef long long int lint;

static inline int in(){ int x; scanf("%d", &x); return x; }
static inline lint inl(){ lint x; scanf("%lld", &x); return x; }

int main()
{
    int L, A, B, C, D;
    L = in();
    A = in();
    B = in();
    C = in();
    D = in();
    printf("%d\n", L - max((A + C - 1) / C, (B + D - 1) / D));
    return (0);
}

C++: #include <iostream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <cassert>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define chmax(a,b) (a<(b)?(a=b,1):0)
#define chmin(a,b) (a>(b)?(a=b,1):0)
#define valid(y,x,h,w) (0<=y&&y<h&&0<=x&&x<w)
const int INF = 1<<29;
const double EPS = 1e-8;
const double PI = acos(-1);
typedef pair<int,int> pii;
typedef long long ll;

int main() {
  int L;
  while(cin >> L) {
    int A,B,C,D;
    cin >> A >> B >> C >> D;
    cout << L-max((A+C-1)/C,(B+D-1)/D) << endl;
  }
}

C++: #include<iostream>
#include<math.h>
#include<vector>
using namespace std;
int main()
{
	int a,b,c,d,l,ans;
	cin >> l;
	cin >> a;
	cin >> b;
	cin >> c;
	cin >> d;
	if(a/c > b/d && a%c==0)
	{
		//cout<<"ok1";
		ans=a/c;
	}
	else if(a/c > b/d && a%c!=0)
	{
		//cout<<"ok2";
		ans=(a/c)+1;
	}
	else if(a/c < b/d && a%c==0)
	{
		//cout<<"ok3";
		ans=b/d;
	}
	else
		ans=(b/d)+1;

	cout << l-ans;


	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a,b,day,A,B,bell;
  cin >> day;
  cin >> a >> b >> A >> B;
  while(a>0 || b>0){
    a=a-A;
    b=b-B;
    day--;
  }
  cout << day << endl;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main()
{
  int l,a,b,c,d;
  cin>>l>>a>>b>>c>>d;
  int t1=ceil((double)a/c),t2=ceil((double)b/d);
  if(t1>t2)
    cout<<l-t1<<endl;
  else
    cout<<l-t2<<endl;
}

C++: 

#include<cstdio>
#include<iostream>

using namespace std;


const int N = 111;

int main(){
	
	
	int n;
	int a,b,c,d;
	
	cin>>n>>a>>b>>c>>d;
	
	printf("%d\n", n - max((a-1)/c+1, (b-1)/d+1));
}

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

int main () {
	int a,b,c,d,L;
	int hi,tuki;
	float fhi,ftuki;
	cin >> L >> a >> b >> c >> d;
	hi=a/c;
	fhi=(float)a/c;
	tuki=b/d;
	ftuki=(float)b/d;
	if(hi<fhi){
		fhi++;
		}
	if(tuki<ftuki){
		ftuki++;
		}
	if(hi>tuki){
		cout << L-hi <<'\n';
	}else{
		cout << L-tuki <<'\n';
	}
	return 0;
}

C++: #include <iostream>

using namespace std;


int main(){

  int a,b,c,d,l,sum=0,e,f;

 cin >> l >> a >> b >> c >> d ;
 
while(1){

  if(a<c){
    f=1;
  }

  if(f==1){
    break;
  }
 c+=c;

 sum++;
 }

while(1){

  if(b<d){
    e=1;
  }

  if(e==1){
    break;
  }
 d+=d;

 sum++;
 }

 cout << l-sum << '\n';


 return 0;
}