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 <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
/*
template<class... T>
ostream& operator<<(ostream& os, tuple<T...>& t) {
	for (size_t i = 0; i < tuple_size< tuple<T...> >::value; ++i) {
		if (i) os << " ";
		os << get<0>(t);
	}
	return os;
}
*/
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	int L; cin >> L;
	int A, B, C, D; cin >> A >> B >> C >> D;
	int ans = max((A+C-1)/C, (B+D-1)/D);
	ans = L-ans;
	cout << ans << endl;
}

C++: #include<iostream>
using namespace std;
int main()
{
  int day,j,m,maxj,maxm;
  int jday,mday;

  cin >> day >> j >> m >> maxj >> maxm;

  if(j%maxj==0) jday=j/maxj;
  else jday=j/maxj+1;
  if(m%maxm==0) mday=m/maxm;
  else mday=m/maxm+1;
  int ans;
  if(jday>=mday) ans=jday;
  else ans=mday;
  cout << day-ans << endl;
  return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

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

    int ret = l - max((a + c - 1) / c, (b + d - 1) / d);
    cout << ret << endl;

    return 0;
}

C++: #include<stdio.h>
int main()
{
	int a[101], temp = 0, ruio = 0, ahotoy=0,b[101];
	for (int i = 1; i <= 5; i++) {
		scanf("%d", &a[i]);
	}
	for (int i = 1; i <= 5; i++) {
		b[i] = a[i];
	}
	while (a[2] > 0 && a[3] > 0) {
		if (a[2] > 0) {
			a[2] = a[2] - a[4];
			ruio++;
		}
		else {
			a[3] = a[3] - a[5];
			ruio++;
		}
		b[2] = b[2] - (b[4] - 2);
		b[3] = b[3] - (b[5] - 2);
		temp++;
	}
	if (ruio >temp) {
		ruio = temp;
	}
	printf("%d\n", a[1]-ruio);
}

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++;
 }

 printf("%d\n",l-sum);


 return 0;
}

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

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

C++: #include <bits/stdc++.h>
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;
    return 0;
}

C++: #include<bits/stdc++.h>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;

int main(){
	int a[5];
	for(int i=0;i<5;i++) scanf("%d",&a[i]);
	printf("%d\n",min(a[0],min(a[1],a[2]))+min(a[3],a[4])-50);
}

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 L,A,B,C,D;//L:winter vacation A:Japanese homework B:math homework
	cin>>L>>A>>B>>C>>D;
	double spentA=(double)A/C;
	double spentB=(double)B/D;
	int wasteA=(int)spentA;
	int wasteB=(int)spentB;
	int ansA,ansB;
	if(spentA==wasteA)ansA=wasteA;
	else ansA=wasteA+1;
	if(spentB==wasteB)ansB=wasteB;
	else ansB=wasteB+1;
	//cout<<ansA<<" "<<ansB<<endl;
	cout<<L-max(ansA,ansB)<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int l,a,b,c,d;
    cin >> l >> a >> b >> c >> d;
    int s=(a/c),t=(b/d);
    if(a%c!=0){s++;}
    if(b%d!=0){t++;}
    cout << l-max(s,t) << endl;

    return 0;
}

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)
		ans=a/c;
	else if(a/c > b/d || a%c!=0)
		ans=(a/c)+1;
	else if(a/c < b/d || a%c==0)
		ans=b/d;
	else
		ans=(b/d)+1;
	cout << l-ans;


	return 0;
}

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

int main()
{
int L,A,B,C,D,K,E,F,G,H;
cin>>L>>A>>B>>C>>D;
E=A/C;
F=B/D;
G=A%C;
H=B%D;
if(E<F){
if(G>0){
E+=1;
}
if(H>0){
F+=1;
}
K=L-E;
}
if(E>F){
if(G>0){
E+=1;
}
if(H>0){
F+=1;
}
K=L-F;
}
if(E=F){
if(G>0){
E+=1;
}
if(H>0){
F+=1;
}
K=L-E;
}
cout<<K<<'\n';
return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#define INF 3000000000000000000
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
using namespace std;

int main(){
	int l,a,b,c,d,j=0,m=0,ans=0;
	scanf("%d %d %d %d %d",&l,&a,&b,&c,&d);
	j=a/c;
	if(a%c)j++;
	m+=b/d;
	if(b%d)m++;
	printf("%d\n",l-max(j,m));
	return 0;
}

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

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

int main()
{
	int l;
	cin>>l;
	2<=l&&l<=40;
	
	int a;
	cin>>a;
	1<=a&&a<=1000;
	
	int b;
	cin>>b;
	1<=b&&b<=1000;
	
	int c;
	cin>>c;
	1<=c&&c<=100;	

	int d;
	cin>>d;
	1<=d&&d<=100;
	
	double jpn;
	jpn=a%c;
	double math;
	math=b%d;
	
	if(jpn>0){
		if(math>0){
			if(jpn+math>1.0){		
				if(a/c>b/d){
				cout<<(l-a/c)+2<<"\n";
				}
			}
		}
	}
	if(jpn>0){
		if(math>0){
			if(jpn+math>1.0){		
				if(b/d>a+c){
				cout<<(l-b/d)+2<<"\n";
			}
		}
	}
	if(jpn>0){
		if(math>0){
			if(jpn+math<=1.0){		
				if(a/c>b/d){
				cout<<(l-a/c)+1<<"\n";
				}
			}
		}
	}
	if(jpn>0){
		if(math>0){
			if(jpn+math<=1.0){		
				if(b/d>a/c){
				cout<<(l-b/d)+1<<"\n";
				}
			}
		}
	}
	
	if(jpn=0){
		if(math=0){	
				if(b/d>a/c){
				cout<<l-b/d<<"\n";
			}
		}
	}

	if(jpn=0){
		if(math=0){		
				if(a/c>b/d){
				cout<<(l-a/c)+1<<"\n";
			}
		}
	}

	return 0;
}

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

using namespace std;

typedef long long lint;

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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
const int mod=998244353,MAX=1<<18,INF=1<<30;

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;
}