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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
using namespace std;

const int INF = 1e9;
typedef long long ll;

int main(void){
  int L, A, B, C, D;
  cin >> L >> A >> B >> C >> D;
  int DA = (A % C == 0) ? A / C : A / C + 1;
  int DB = (B % D == 0) ? B / D : B / D + 1;
  cout << L - max(DA, DB) << endl;
  return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#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 <numeric>
#include <list>
#include <iomanip>
#include <fstream>
#include <bitset>
   
using namespace std;
   
 
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define rforeach(it, c) for (__typeof__((c).rbegin()) it=(c).rbegin(); it != (c).rend(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define CL(arr, val) memset(arr, val, sizeof(arr))
#define COPY(dest, src) memcpy(dest, src, sizeof(dest))
#define ten(n) ((long long)(1e##n))
#define bin(n) (1LL << (n))
#define erep(i, n) for (int i = 0; i <= (int)(n); ++i)
#define revrep(i, n) for (int i = (n); i >= 0; --i)
#define pb push_back

template <class T> void chmax(T& a, const T& b) { a = max(a, b); }
template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
 
template <class T> void uniq(vector<T>& c) { sort(c.begin(), c.end()); c.erase(unique(c.begin(), c.end()), c.end()); }
 
template <class T> string to_s(const T& a) { ostringstream os; os << a; return os.str(); }
template <class T> T to_T(const string& s) { istringstream is(s); T res; is >> res; return res; }
  
template <class T, class U> ostream& operator<<(ostream& os, pair<T, U>& p) { os << "( " << p.first << ", " << p.second << " )"; return os; }
  
template <class T> void print(T a, int n, const string& deli = " ", int br = 1) { for (int i = 0; i < n; ++i) { cout << a[i]; if (i + 1 != n) cout << deli; } while (br--) cout << endl; }
template <class T> void print(const T& c, const string& deli = " ", int br = 1) { foreach (it, c) { cout << *it; if (++it != c.end()) cout << deli;--it; } while (br--) cout << endl; }
template <class T> void print2d(T a, int w, int h, int width = -1, int br = 1) { for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) {    if (width != -1) cout.width(width); cout << a[i][j] << ' '; } cout << endl; } while (br--) cout << endl; }
   
template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }

void fix_pre(int n) { cout.setf(ios::fixed, ios::floatfield); cout.precision(10); }
void fast_io() { cin.tie(0); ios::sync_with_stdio(false); }
#define trace(x) (cout << #x << ": " << (x) << endl)
 
bool in_rect(int x, int y, int w, int h) { return 0 <= x && x < w && 0 <= y && y < h; }
 

typedef long long ll;
typedef pair<int, int> pint;
 
// y(v): v>^<  y(^): ^>v<
const int dx[] = { 0, 1, 0, -1 };
const int dy[] = { 1, 0, -1, 0 };

const double PI = acos(-1.0);

#define F first
#define S second



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

C++: #include <stdio.h>
int main(){
  int L,A,B,C,D,i;
  scanf("%d %d %d %d %d",&L,&A,&B,&C,&D);
  
  if(A/C>B/D){
    if(A%C==0)L-=A/C;
    else L-=A/C+1;
  }
  else if(A/C<B/D){
    if(B%D==0)L-=B/D;
    else L-=B/D+1;  
  }
  else{
    if(A%C!=0||B%D!=0)L-=(A/C+1);
    else L-=A/C;
  } 
  
  printf("%d\n",L);
  
  return 0;
}

C++: #include<iostream>

using namespace std;

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

  int Japanese,Math;
  Japanese = A / C;
  if(A % C != 0){
    ++Japanese;
  }
  Math = B / D;
  if(B % D != 0){
    ++Math;
  }

  int ans;
  if(Japanese >= Math){
    ans = L - Japanese;
  }
  else{
    ans = L - Math;
  }

  cout<<ans<<endl;

  return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
  int natu,suugaku,kokugo,suu,koku;
  cin >> natu >> kokugo >> suugaku >> koku >> suu;
  int km = (kokugo/koku);
  if(kokugo%koku > 0)km++;
  int sm = (suugaku/suu);
  if(suugaku%suu > 0)suu++;
  if( km > sm ){
    cout << natu-km << endl;
  }else {
    cout << natu-sm << endl; 
  }
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int l,a,b,c,d,x,y,z;
	scanf("%d %d %d %d %d",&l,&a,&b,&c,&d);
	x=a%c;
	if(a%c>0){
		x+1;
	}
	y=b%d;
	if(b%d>0){
		y+1;
	}
	if(x>y){
		z=l-x;
	}
	else{
		z=l-y;
	}
	printf("%d\n",z);
	return 0;
}

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

int main()
{
    int A, B;
    int C, D;
    int L;

    cin >> L;
    cin >> A >> B >> C >> D;

    while (1){
        A -= C;
        B -= D;
        L--;
        if (A <= 0 && B <= 0){
            break;
        }
    }
/*    while (A > 0){
        A -= C;
        L--;
    }
    while (B > 0){
        B -= D;
        L--;
    }*/
    cout << L << endl;
    return (0);
}

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


int main(){
	int L,A,B,a,b,reA=0,reB=0;
	cin >>L>>A>>B>>a>>b;
	if(A % a != 0){
		reA++;
		A = A-(A%a);
		reA = reA + A/a;
	}else{
		reA = A/a;
	}
	if(B % b != 0){
		reB++;
		B = B-(B%b);
		reB = reB +B/b;
	}else{
		reB = B/b;
	}
	cout << L -max(reA,reB)<<endl;

		return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <complex>
#include <string>
#include <sstream>

#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>

using namespace std;

#define all(c) c.begin(),c.end()
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

typedef long long ll;
typedef vector<int> vi;


template<typename T>
ostream& operator<<(ostream& os,const vector<T>& val){
    os << "[ ";
    for(typename vector<T>::const_iterator it=val.begin();
        it != val.end();++it){
        os << *it << " ";
    }
    os << "]";
    return os;
}

int s(int a,int b){
    return ceil(1.0*a / b);
}

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

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