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<stdio.h>

int main()
{
	int num[5] = {0};
	int koku = 0, san = 0;

	//freopen("C:\\Users\\j2402\\Desktop\\nyu.txt","r",stdin);
	//freopen("C:\\Users\\j2402\\Desktop\\syu.txt","w",stdout);

	for(int i =0;i<5;i++)
	{
		scanf("%d",&num[i]);
	}

	while(num[1] >0 || num[2] >0)
	{
		if(num[1] > 0)
		{
			num[1]= num[1] - num[3];
			koku++;
		}
		if(num[2] > 0)
		{
			num[2] = num[2] - num[4];
			san++;
		}

		num[0] = num[0]-1;
	}

	printf("%d\n",num[0]);

	return 0;
}

C++: #include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
	int a, b, c, d, e;
	cin >> a;
	cin >> b;
	cin >> c;
	cin >> d;
	cin >> e;
	cout << a - (b + d - 1) / b - (c + e - 1) / e << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(ll i=(n)-1;i>=0;i--)
#define range(i,a,n) for(ll i=(a);i<(n);i++)
#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (1000000007ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI (3.1415926535897932384)

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};
template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S sum(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}

template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>void tf(bool b,S t,T f){if(b)puta(t);else puta(f);}
void YN(bool b){tf(b,"YES","NO");}
void Yn(bool b){tf(b,"Yes","No");}
void yn(bool b){tf(b,"yes","no");}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1;for(auto s:t){os<<(a?"":" ")<<s;a=0;}return os;}
template<class S>auto&operator>>(istream&is,vector<S>&t){for(S&a:t)cin>>a;return is;}

/*他のライブラリを入れる場所*/


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	vd a(5);
	cin>>a;
	puta((int)(a[0]-max(ceil(a[1]/a[3]),ceil(a[2]/a[4]))));
	return 0;
}

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

int main(){
  int l,a,b,c,d;
  while(cin >> l >> a >> b >> c >> d){
    int ans = 0;
    if(a % c != 0) ans = a / c + 1;
    else ans = a / c;
    if(b % d != 0) ans = max(ans,b / d + 1);
    else ans = max(ans,b / d);
    cout << l - ans << endl;
  }
}

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

int main(){
  int L, A, B, C, D;
  int a, b;
  
  cin >> L >> A >> B >> C >> D;
  a = A / C;
  if(A % C != 0) a++;
  b = B / D;
  if(B % D != 0) b++;
  
  int ans = L - max(a, b);
  cout << ans << endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c,d,e,f,g,h,i,j,k;
	float A;
	cin>>a>>b>>c>>d>>e;
	A=b-d;
	g=0;
	g++;
	for (;;)
	{
		A=A-d;
		if (A<=0)
		{
			g++;
			break;
		}
		else if (A>0)
		{
			g++;
		}
	}
	A=c-e;
	f=0;
	f++;
	for (;;)
	{
		A=A-e;
		 if (A<=0)
		{
			f++;
			break;
		}
		else if (A>0)
		{
			f++;
		}
	}
	if (f<=g)
	{
		g=a-g;
		cout<<g<<endl;
	}
	else if(f>=g)
	{ 
		f=a-f;
		cout<<f<<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

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

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

int main() {
	int L, a, b, c, d;
		cin >> L >> a >> b >> c >> d;
		
		int k = a / c;
		int s = b / d;
		
		if (a % c != 0) {
			k++;
		}
		if (b % d != 0) {
			s++;
		}
		
		cout << (L - (k > s ? k : s)) << endl;
}

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

int main()
{
	//??????(homework)
	int num1=0,num2=0,num3=0,num4=0,num5=0,num6=0,num7=0,num8=0,num9=0,num10=0,t=0;
	cin>>num1>>num2>>num3>>num4>>num5;
	num6=num2/num4;
	num9=num2%num4;
	if(num9!=0){
		num6=num6+1;
	}
	num7=num3/num5;
	num10=num3%num5;
	if(num10!=0){
		num7=num7+1;
	}
	if(num6<num10){
		t=num6;
		num6=num10;
		num10=t;
	}
	num8=num1-num6;
	cout<<num8;
	cout<<"\n";
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
#define INF ( 1 << 30 )
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;
}

C++: #include<stdio.h>
int main()
{
	int a, b, c, d, e,i,o=0;
	scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
	while (1){
		o++;
		b -= d;
		c -= e;
		if (b <= 0 && c <= 0){
			break;
		}
		
}
	a = a - o;
	printf("%d",a );
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c,d,e,f,g,h,i,j,k;
	float A;
	cin>>a>>b>>c>>d>>e;
	A=b-d;
	f=0;
	f++;
	for (;;)
	{
		A=A-d;
		if(A>0)
		{
			f++;
		}
		else if (A<=0)
		{
			f++;
			break;
		}
	}
	A=c-e;
	f=0;
	g++;
	for (;;)
	{
		A=A-e;
		if (A>0)
		{
			g++;
		}
		else if (A<=0)
		{
			g++;
			break;
		}
	}
	if (f<=g)
	{
		g=a-g;
		cout<<g<<endl;
	}
	else if(f>=g)
	{ 
		f=a-f;
		cout<<f<<endl;
	}
	return 0;
}

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

int main(){
	int L,A,B,C,D;
	cin >>L >>A >>B >>C >>D;
	cout << L-(A/C+B/D);

	return 0;
}

C++: #include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n;i>=0;i--)
#define INF 100000005
#define MAX 1002
#define mp make_pair
#define pb push_back
#define fi first
#define se second
using namespace std;
//__gcd(a,b), __builtin_popcount(a);

int main(){
	int n, a, b, c, d, t1, t2, t3;
	scanf("%d%d%d%d%d",&n,&a,&b,&c,&d);
	t1 = a/c;t2 = b/d;
	if(t1*c != a)t1++;
	if(t2*d != b)t2++;
	t3 = max(t1, t2);
	printf("%d\n", n-t3);
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int l,a,b,c,d,e,max,s,ss,sss;
	max=-1;
	scanf("%d",&l);
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	s=a/c;
	ss=b/d;
	if(a%c!=0){
		s++;
	}
	if(b%d!=0){
		ss++;
	}
	if(s<ss){
		sss=l-ss;
		printf("%d\n",sss);
	}
	else{
		sss=l-s;
		printf("%d\n",sss);
	}
	return 0;
}

C++: #include <math.h>
#include <stdio.h>

int main(){
    int i,l,a,b,c,d,an;
    scanf("%d",&l);
    scanf("%d",&a);
    scanf("%d",&b);
    scanf("%d",&c);
    scanf("%d",&d);
    if(a/c > b/d){
	an=a/c;
	if(a%c!=0){
	    an +=1;
	}
    }
    else {
	an=b/d;
	if(b%d!=0){
	    an +=1;
	}
    }
    printf("%d\n",l-an);
    return 0;
}

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