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 <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>
#include <iomanip>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;


int main(){

    int L,A,B,C,D;
    cin>>L>>A>>B>>C>>D;
    
    int ans=0;
    if(A%C==0)ans+=A/C;
    else ans+=A/C+1;
    
    if(B%D==0)ans=max(ans,B/D);
    else ans=max(ans,B/D+1);
    
    cout<<L-ans<<endl;
    
    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,m,a,s,d,x,w,p=0;
	scanf("%d %d %d %d %d",&n,&m,&a,&s,&d);
	w=0;
	while(1){
		if(m<s) break;
		s+=s;
		w++;
	}
	x=0;
	while(1){
		if(a<d) break;
		d+=d;
		x++;
	}
	p=x+w;
	n=n-p;
	printf("%d\n",n);

}

C++: #include<iostream>
using namespace std;
int main(){
	int a , b , c , d , l;
	int s;
	cin >> l >> a >> b >> c >> d;
	int na = (a + c - 1) / c;
	int nb = (b + d - 1) / d;
	if (na > nb){s = na;}
	else{s = nb;}
	int p = l - s;
	cout << p << endl;
	return 0; 
}

C++: #include <iostream>
using namespace std;
int main() {
	int l,a,b,c,d,e;
	cin>>l>>a>>b>>c>>d;
	if(a/c<b/d){
		e=b/d;
		if(b%d>0)
			e=e+1;
	}
	else{
		e=a/c;
		if(a%c>0)
			e=e+1;
	}
	cout<<l-e<<endl;
	return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define first F
#define second S

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int l,a,b,c,d;
  cin>>l>>a>>b>>c>>d;
  int jpn=a/c+(a%c!=0);
  int math=b/d+(b%d!=0);
  cout<<l-max(jpn,math)<<endl;
}

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

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

C++: #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    int tino,tiya,kokoa,rize,syaro;
    cin>>tino>>tiya>>kokoa>>rize>>syaro;
    int gotiusa=0,aoyama=0;
    for(;tiya>0;gotiusa++)tiya-=rize;
    for(;kokoa>0;aoyama++)kokoa-=syaro;
    cout<<tino-max(aoyama,gotiusa)<<endl;
}

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

int main() {
	int a, b, c, d, e, q, w;
	cin >> a >> b >> c >> d >> e;
	q = b / d;
	if (b%d == 1) q += 1;
	w = c / e;
	if (c%e == 1) w += 1;
	cout << a - max({ q,w }) << endl;
}

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

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

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

	int cnt = 1;
	while (a >= 0 && b >= 0) {
		a -= c;
		b -= d;
		++cnt;
	}
	cout << l - cnt << endl;
}

C++: #include <iostream>
using namespace std;
int main(){
	int L, A, B, C, D;
	cin >> L >> A >> B >> C >> D;

	A = A%C == 0 ? A/C : A/C + 1;
	B = B%D == 0 ? B/D : B/D + 1;

	L = A>B ? L-A:L-B;

	cout << L << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int l;
	double a,b,c,d;
	cin>>l>>a>>b>>c>>d;
	int  an;
	double ko,sa;
	ko=a/c;
	sa=b/d;
	an=l-max(ko,sa);
	printf("%d\n",an);
}

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

int main()
{
int L,A,B,C,D,a,b;
cin>>L;
cin>>A;
cin>>B;
cin>>C;
cin>>D;

a=A/C;
b=B/D;

if(A%C>0)
a++;
if(B%D>0)
b++;

if(a>b)
cout<<L-a<<'\n';
if(a<b)
cout<<L-b<<'\n';

return 0;
}

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

int main(){

  int l, a, b, c, d;
  int p, q;

  cin >> l >> a >> b >> c >> d;
  p = a/c;
  if(a%c) p++;

  q = b/d;
  if(b%d) q++;

  cout << l-max(p,q) << endl;
}

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

int main() {
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	int S = b / d;
	if (b%d)S++;
	int K = c / e;
	if (c%e)K++;
	a -= max(S, K);
	cout << a << endl;
}

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