// luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
int c,a,v0,v1,p,i;
int main()
{
	//freopen("MrBA.in","r",stdin);
	//freopen("MrBA.out","w",stdout);
	cin>>c>>v0>>v1>>a>>p;
	c-=v0;
	for(i=2;;i++){
		if(c<=0)
		{
			cout<<i-1;
			return 0;
		}
		if(v0<v1) v0+=a;
		if(v0>v1) v0=v1;
		c-=v0-p;
	}
	return 0;
}

#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cmath>
#define ll long long

using namespace std;

ll c, x, y, r, mins, s, cnt, ans;

int main () {
	cin >> c >> x >> y >> r >> mins;
	while(cnt < c){
		ans++;
		cnt = max(cnt - mins, s);
		cnt = cnt + min(x, y);
		x += r;
	}
	cout << ans ;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long c,v0,v1,a,l,t,i,j,p;
int main()
{
    cin>>c>>v0>>v1>>a>>l;
    t=v0;
    i=0;
    p=v0;
    while(t<c)
    {
        i++;
        if(p+a<=v1)
        {
            t+=p+a-l;
            p=p+a;
        }
        else
        {
            t+=v1-l;
            p=v1;
        }
    }
    cout<<(i+1)<<endl;
    /*if(a!=0)
    {
        i=v1/a;
        t=(i+1)/2*(2*v0+i*a-l);
    }
    else i=c;
    if(t>c || a==0)
    {
        inf=0;
        sup=i;
        while(cc<100)
        {
            mid=(inf+sup)/2;
            if((mid+1)/2*(2*v0+mid*a-l)>c)sup=mid;
            else inf=mid+1;
            cc++;
        }
        cout<<mid+1<<" "<<(mid+1)/2*(2*v0+mid*a-l)<<endl;
    }
    else if(t<c)
    {
        inf=0;
        sup=c;
        while(cc<100)
        {
            mid=(inf+sup)/2;
            if(t+(mid+1)/2*(2*v0+mid*v1-l)>c)sup=mid;
            else inf=mid;
            cc++;
        }
        cout<<i+mid+1<<" "<<t+(mid+1)/2*(2*v0+mid*v1-l)<<endl;
    }
    else if(t==c)cout<<i+1<<endl;*/
}

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

int main()
{
	int a,c,u,v,w,l,k,j,s,som=1;
	cin>>c>>v>>w>>a>>l;
	s=v;
	u=v;
	if(c<v);
	else if(a==0){
		u=u-l;
		c=c-v;
		som=som+c/u;
		if(c%u) som++;
	}else{//cout<<som<<endl;

	while(s<c){

			u=u+a;
			if(u<w){
				som++;
				s=s+u-l;
			}else{
				u=w;
				u=u-l;
				c=c-s;
				som=som+c/u;
				if(c%u) som++;
				s=c;
			}

		}

}
	cout<<som;

	return 0;
}

#include <bits/stdc++.h>
#define LL long long
using namespace std;

int main() {
	// your code goes here
	LL c,v0,v1 , a,l;
	scanf("%lld %lld %lld %lld %lld",&c, &v0, &v1, &a, &l);
	LL i=1, pages =v0, cnt = 1;

	while(true){
	    if(pages>=c) break;
	    pages-=l;
	    //printf("%lld\n",pages);
	   	LL inc = (v0+i*a);
	    inc = min(inc,v1);
	    pages+=inc;
	    //printf("%lld\n",pages);
	    i++;
	    cnt++;
	}
	printf("%lld\n",cnt);
	return 0;
}

///   BISMILLAHIR RAHMANIR RAHEEM
///   ALLAH IS WATCHING ME
///   ALLAH save us from COVID-19.Amin.
///   Every soul shall taste death.
/* Which of the favors of your Lord will you deny? */
///I Love My Prophet Hazrat Mohammad(SA)
/*
                                 ---------------------------
                                    #BoycottFrenceProducts
                                 ---------------------------
*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{

     ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int c,v0,v1,a,l;
  cin>>c>>v0>>v1>>a>>l;
  int ans=0,pr=0,i=0;
  if(c==v0)
  {
    cout<<1<<endl;
    return 0;
  }
  while(pr<c)
  {
    int s=v0+a*i;
    if(s>v1)
      s=v1;
    pr+=s;
     ans++;
    if(pr>=c)
      break;
    pr-=l;

    i++;
  }
  cout<<ans<<endl;

}
//Alhamdulillah

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

int main()
{
    int c, v0, vmax, a, l;
    cin >> c >> v0 >> vmax >> a >> l;
    int s=v0, k=1;
    if(c<=v0){
        cout << 1;
        return 0;
    }
    while(1)
    {
        if(v0<=vmax-a)
        v0 += a;
        else v0=vmax;
        s -= l;
        s += v0;
        if(s>=c)
        {
            k++;
            break;
        }
        k ++;
    }
    cout << k;
}

#include<iostream>
#include<stack>
#include<algorithm>
using namespace std;
int main()
{
 int c,v0,v1,a,l;
 cin>>c>>v0>>v1>>a>>l;
 int days=0;
 while(c>0)
 {
      days++;
     if(days==1)
        c-=v0;
        else{
     if((v0+((days-1)*a))<=v1)
     {
         if((v0+((days-1)*a))>l)
         {c-=(v0+((days-1)*a))-l;}
         else
            continue;

     }
     else
        c-=v1-l;
        }

 }
 cout<<days;
}

#include<iostream>
using namespace std;
int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int cnt=0;
    int sum=1;
    for(int i=0;;i++){
        int w=v0+i*a;
        if(w>=v1) w=v1;
        sum=sum+w-1;
        cnt++;
        if(sum>=c) break;
        sum++;
        sum-=l;
     }
       cout<<cnt<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define int long long
using ll=long long;
using vi=vector<int>;
using vl=vector<long long>;
using pii=pair<int,int>;
using pll=pair<long long,long long>;
#define ITR(i,c) for(auto i=begin(c);i!=end(c);++i)
#define FORE(x,c) for(auto &x:c)
#define REPF(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define REP(i,n) REPF(i,0,n)
#define REPR(i,n) for(int i=(int)(n);i>=0;--i)
#define REPW(i,n) for(i=0;i<(int)(n);++i)
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)
#define SZ(c) ((int)c.size())
#define CONTAIN(c,x) (c.find(x)!=end(c))
#define OUTOFRANGE(y,x,h,w) (y<0||x<0||y>=h||x>=w)
#define dump(...)
const int DX[9]={0,1,0,-1,1,1,-1,-1,0},DY[9]={-1,0,1,0,-1,1,1,-1,0};
#define INF (1001001001)
#define INFLL (1001001001001001001ll)
template<class T> ostream& operator << (ostream &os,const vector<T> &v) {
    ITR(i,v) os << *i << (i==end(v)-1 ? "" : " "); return os; }
template<class T> istream& operator >> (istream &is,vector<T> &v) {
    ITR(i,v) is >> *i; return is; }
template<class T> istream& operator >> (istream &is, pair<T,T> &p) {
        is >> p.first >> " " >> p.second; return is; }
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return 1;}return 0;}
//------------------------------------------------------------------------------
struct before_main_function {
    before_main_function() {
        #ifdef int
            #undef INF
            #define INF INFLL
            #define stoi stoll
        #endif
        cin.tie(0);ios::sync_with_stdio(false);
        cout<<setprecision(15)<<fixed;
    }
} before_main_function;
//------------------8<------------------------------------8<--------------------

signed main() {
    int c,l,v0,v1,a;
    cin>>c>>v0>>v1>>a>>l;
    int cur=v0;
    int sum=0;
    REP(k,1010) {
        if(k>0) sum-=l;
        sum+=cur;
        if(sum>=c) {
            cout<<k+1<<endl;
            return 0;
        }
        cur+=a;
        if(cur>v1) cur=v1;
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int bookpage,fRead,limRead,speed,reRead;
    cin>>bookpage>>fRead>>limRead>>speed>>reRead;
    int remain=bookpage; remain-=fRead; int days=1;
    if(remain>0)
    {
        while(remain>0)
        {
            if((fRead+speed)<limRead) fRead+=speed;
            else if((fRead+speed)>=limRead) fRead=limRead;
            remain+=reRead;
            remain-=fRead;
            days++;
            if(remain<=0) break;
        }
    }
    cout<<days<<endl;
}

#include <bits/stdc++.h>

#define ll long long
using namespace std;

int main() {

    ll c,v0,v1,a,l;
    ll cur = 0;

    cin >> c >> v0 >> v1 >> a >> l;

     ll ans = 0;
     ll speed = v0;
     while(cur < c) {
        ans++;
        if (ans >= 2) {
            speed = min(speed + a, v1);
            cur = cur - l;
        }
        cur += speed;
        //cur = max(cur+speed-l, 1);
     }
     cout << ans << "\n";

    return 0;
}

#include <iostream>
#include<cstring>
#include<cstdio>
#include<cstring>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    int ans=0;
    int rem=0;
    cin>>c>>v0>>v1>>a>>l;
    if(c<=v0)
        ans=1;
    else
    while(c>0)
    {
        int vv=0;
        if(v0+a*ans>v1)
            vv=v1;
        else
            vv=v0+a*ans;
        if(ans!=0)
        c=c-(vv-l);
       else
        c=c-vv;

        ans++;
    }
    cout << ans << endl;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int ans=1;

    int val=v0;

    if(val!=c)
    {
        while(c>val)
        {
            val-=l;

            int sub=min(v0+ans*a,v1);
            val+=sub;
            ans++;

        }
    }

    cout<<ans<<endl;

    return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define MAX 100000000000000007
#define MIN -100000000000000007
#define pb push_back
#define X 100000
using namespace std ;

int main()
{

    ios::sync_with_stdio(false);

    long long cnt = 0 , c , v_0 , v_1 , a , l , k = 0 ;
    cin >>c >> v_0 >> v_1 >> a >> l ;
    bool flag = false ;
    while( c > 0 )
    {
        c = c -  min(v_0,v_1) ;
        v_0 += a ;
        if(flag )c += l ;
        else flag = true ;
        //k += a ;
        cnt ++ ;
        //cout << c << "\n" ;
    }
    cout << cnt << "\n" ;

    return 0 ;

}

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    int c,v0,v1,a,l,sum=0;
    cin>>c>>v0>>v1>>a>>l;
    int i=0,b;
    while(1)
    {
        b=v0+i*a;
        if(b>=v1)
        b=v1;
        sum=sum+b;
       i++;
      if(sum>=c)
            break;
    else
            c+=l;
    }
    cout<<i<<endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

//data_types
#define lli 		long long int
#define vi			vector<int>
#define str  		string
#define ii 			pair<int,int>
#define crd			pair<double,double>
#define vii 		vector<ii>
#define vb			vector<bool>
#define mp			make_pair
#define xx 			first
#define yy			second
#define all(a)		a.begin(),a.end()
#define ins			insert
#define pb			push_back
#define sq(x)		((x)*(x))
//input/output and loops
#define gi(n)		scanf("%d",&n)
#define glli(n) 	scanf("%lld",&n)
#define puti(n) 	printf("%d\n",n)
#define fori(i,m,n) for(int i=m;i<=n;i++)
#define ford(i,m,n)	for(int i=m;i>=n;i--)

//max,mod and inf
#define N 			((int)1e5)
#define mod			((lli)1e9+7)
#define	inf			INT_MAX
#define t 			true;
#define f 			false;

//functions
template <typename T>
T prod(const T &a,const T &b)
{
	return ((a%mod)*(b%mod))%mod;
}
template <typename T>
T pow(const T &a,const T &b)
{
	if(!b) return 1;
	lli p = pow(a,b/2);
	p*=p;
	return (b%2)?(p*a):p;
}
template <typename T>
T modpow(const T &a,const T &b)
{
	if(!b) return 1;
	lli p = modpow(a,b/2);
	p = prod(p,p);
	return (b%2)?(prod(p,a)):p;
}
template <typename T>
T gcd(const T &a,const T &b)
{
	if(!b)	return a;
	return gcd(b,a%b);
}
template <typename T>
T lcm(const T &a,const T &b)
{
	return (a*b)/gcd(a,b);
}

int main()
{
	int c,v0,v1,a,l;
	cin>>c>>v0>>v1>>a>>l;
	c -= v0;
	int ans = 1;
	v0 += a;
	while(c > 0)
	{
		c = c - min(v0,v1) + l;
		v0 += a;
		ans++;
	}
	cout<<ans<<endl;
	return 0;
}

#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <fstream>
#include <time.h>
#include <string>

#define base 1000000007
#define kN 800//8020

using namespace std;

int main()
{
    //clock_t tStart = clock();

    /*std::ofstream out("/Users/Sako/Работа/CodeForces/CodeForces/in.txt");
     std::cout.rdbuf(out.rdbuf());

     cout<<30<<endl;
     for(int i=0;i<30;i++)
     {
     cout<<i+1<<" ";
     }
     return 0;*/

    //std::ifstream in("/Users/Sako/Работа/CodeForces/CodeForces/in.txt");
    //std::cin.rdbuf(in.rdbuf());

    int c, v0, v1, a, l;
    cin>>c>>v0>>v1>>a>>l;

    bool first = true;
    int d = 0;
    int v = v0;
    while(c>0)
    {
        if(first)c-=v;
        else c=c-(v-l);
        d++;
        v = min(v1, v+a);
        //c+=l;
        first = false;
    }

    cout<<d;

    //printf("Time taken: %.3fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
    return 0;
}

#include<bits/stdc++.h>

using namespace std;
///////////////////////////////////Nikhil Srivastava////////////////////////////////////////
///////////////////////////////////IIT Jodhpur//////////////////////////////////////////////
///////////////////////////////////Bazinga//////////////////////////////////////////////////
#define SPEED ios::sync_with_stdio(false); cin.tie(0)
#define sci(a) scanf("%d",&a)
#define scl(a) scanf("%I64d",&a)
#define scc(a) scanf("%c",&a)
#define scf(a) scanf("%f",&a)
#define scd(a) scanf("%lf",&a)
#define scs(a) scanf("%s",&a)
#define printi(x) printf("%d\n",x)
#define printl(x) printf("%lld\n",x)
#define loop(i,a,n) for(int i=a;i<n;++i)
#define loopd(i,a,n) for(int i=a;i>=n;--i)
#define nl printf("\n");
#define ll long long int
#define ld long double
#define mp(a,b) make_pair(a,b)
#define pi pair < int,int >
#define pl pair < ll,ll >
#define pb push_back
#define maxi 100005
#define MOD (1000000007LL)
#define INF 1e18
#define MAXI 1000005
#define ff first
#define ss second
static int rowNbr[] = {-1, -1, -1,  0, 0,  1, 1, 1};
static int colNbr[] = {-1,  0,  1, -1, 1, -1, 0, 1};
ll power(ll base, ll p){
ll ans = 1;while(p){if(p&1)ans=(ans*base);base=(base*base);p/=2;}return ans;
}

ll modPower(ll base, ll p, ll mod = MOD){
ll ans = 1;while(p){if(p&1)ans=(ans*base)%mod;base=(base*base)%mod;p/=2;}return ans;
}

ll gcd(ll a, ll b){
    if(b == 0)  return a;
    return gcd(b, a%b);
}
/////////////////////////////////////////////Solution From Here//////////////////////////////////////////////////////////

int main()
{

    SPEED;
                                int c,v0,v1,a,l;
                                cin>>c>>v0>>v1>>a>>l;
                                int day = 1;
                                int read = v0;
                                if(v0 < c) {
                                while(1) {
                                    ++day;
                                    if(read >= c)
                                        break;
                                    read +=  min(v1-l,v0+(day-1)*a-l);
                                    }
                                    cout<<day-1;return 0;
                                }
                                cout<<"1";

}

#include<iostream>
using namespace std;
int main()
{
	int c, v0, v1, a, l;
	int k = 1;
	int  x, y;
	cin >> c>> v0>> v1>> a>> l;
	x = v0;
	y = v0;
	while (x < c)
	{
		y = y + a;
		if (y > v1)
			y = v1;

		x = x + y - l;
		k++;
	}
	cout << k<<"\n";
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;

    int count=0,p;
    int i=1;
    p=v0;
    count++;
    while(p<c){
        p-=l;
        if((v0+(i*a))<v1){
            p+=v0+(i*a);
        }
        else
        c-=v1;

        count++;
        i++;

    }
    cout<<count<<endl;
	return 0;
}

#include <stdio.h>

int main(){
    int repaso,limite,paginas,inicio,aceleracion;
    int cant=0;
    scanf("%d %d %d %d %d",&paginas,&inicio,&limite,&aceleracion,&repaso);
    while(paginas>0){

        if(cant==0){
            paginas=paginas-inicio;

        }
        else{
            paginas=paginas-inicio+repaso;

        }
        if(limite > inicio+aceleracion)
            inicio=inicio+aceleracion;
        else
            inicio=limite;
        cant++;

    }
    printf("%d",cant);
    return 0;
}

#include <iostream>
using namespace std;
int main()
{
	int c, v0, v1, a, l,sum,i,x;
	cin >> c >> v0 >> v1 >> a >> l;
	sum = v0, i = 1;
	while (sum < c)
	{
		x = v0 + (i*a);
		if (x > v1) x = v1;
		sum += x;
		sum -= l;
		i++;

	}
	cout << i  << endl;
}

#pragma warning(disable:4996)

#include <iostream>
#include <unordered_map>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <stack>
#include <fstream>
#include <set>
#include <ctime>
#include <queue>
#include <time.h>

#define forn(i, n) for (int i = 0; (i) < (n); i++)
#define all(v) (v).begin(),(v).end()
#define sz(v) int(v.size())

using namespace std;

double PI = 3.1415926535897932384626433832795;

int main() {
	srand(time(NULL));
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	int c, v0, v1, a, l;
	cin >> c >> v0 >> v1 >> a >> l;
	int ans = 0;
	int v = v0;
	int d = 0;
	while (c > 0) {
		c -= v - min(d, l);
		d += v - min(d, l);
		ans++;
		v += a;
		v = min(v, v1);
	}
	cout << ans << endl;
}

#include <iostream>
#include <string>

using namespace std;

int main()
{
	int	c, v0, v1, a, l;
	cin >> c >> v0 >> v1 >> a >> l;
	int counter = 0;
	int now = v0;
	if (v0 + a > v1)
	{
		v0 = v1;
	}
	else
	{
		v0 += a;
	}
	counter++;
	if (now >= c)
	{
		cout << counter;
		return 0;
	}
	while (true)
	{
		now -= l;
		now += v0;
		if (v0 + a > v1)
		{
			v0 = v1;
		}
		else
		{
			v0 += a;
		}
		counter++;
		if (now >= c)
			break;
	}
	cout << counter;
	return 0;
}

#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
    int sum,v0,v1,a,l;
    int ans = 0;
    scanf("%d%d%d%d%d",&sum,&v0,&v1,&a,&l);
    while(1)
    {
        sum -= v0;
        ans++;
        if(sum <= 0)
            break;
        if(v0 + a <= v1)
        {
            v0 += a;
        }
        else
        {
            v0 = v1;
        }
        sum += l;
    }
    cout << ans << endl;
    return 0;
}

#include <iostream>

using std::cin;
using std::cout;
using std::endl;

int main()
{
	short c = -1, v0 = -2, v1 = -3, a = -4, l = -5;
	cin >> c >> v0 >> v1 >> a >> l;

	short n_days = 1,
		  n_pages_read = v0;
	while (n_pages_read < c) {
		int n_pages_to_read_today_theoritical = v0 + n_days * a;
		n_pages_read += (n_pages_to_read_today_theoritical <= v1 ? n_pages_to_read_today_theoritical : v1) - l;
		++n_days;
	}

	cout << n_days << endl;

	//char ch;
	//while (cin >> ch)
	//	if (ch == 'q')
	//		break;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int d=1;
    c=c-v0;
    while(c>0)
    {
      if(v0+a>v1)
        v0=v1;
      else
        v0+=a;
      c=c+l-v0;
      d++;
    }
    cout<<d;
}

#include<bits/stdc++.h>
#define all(s) (s).begin(),(s).end()
using namespace std;
int main()
{
	ios::sync_with_stdio(0),cin.tie(0);

	int n,first,Max,add,rep;
	cin>>n>>first>>Max>>add>>rep;
	int read=first,day=1,k=1;
	while(read<n)
	{
		int daily=first+add*k++;
		read=(daily+rep<=Max ? read+daily-rep : read+min(Max,daily)-rep);
		day++;
	}
	cout<<day;
}

#include <iostream>

using namespace std;

int main()
{

    int c;
    int v0, v1, a, l, zile=1;

    cin>>c>>v0>>v1>>a>>l;

    if (c==v0)
            cout<<zile;
    else
    {

        c-=v0;
        while (c>0)
        {

            if (v0+zile*a<v1)
            {
                c=c-(v0+zile*a-l);
                zile++;
            }
            else
            {
                c=c-(v1-l);
                zile++;
            }

        }
    cout<<zile;
    }

    return 0;
}

#include<iostream>
#include<vector>
#include<stack>
#include<algorithm>
#include<map>
#include<set>
#include<string>
#include<cmath>

using namespace std;
void main() {
	int c, min, max, a, l;
	cin >> c >> min >> max >> a >> l;
	int time = 0;
	int pos = 0;
	while (pos < c) {
		pos -= l;
		if (pos < 0) pos = 0;
		time++;
		pos += min;
		min += a;
		if (min > max) min = max;
	}
	cout << time;
}

#include <bits/stdc++.h>

using namespace std;

#define speed ios::sync_with_stdio(false)
#define ll long long int
#define pb push_back
#define mp make_pair
#define ifl(i,a,b) for(ll i=a;i<b;i++)
#define dfl(i,a,b) for(ll i=a-1;i>=b;i--)

const ll N = 2e5+5;
const ll mod = 1e9+9;

int main()
{
	speed;
	ll c,v,a,v1,l;
	cin>>c>>v>>v1>>a>>l;
	ll ans=0;
	while(c>0)
	{
		c = c-v;
		ans++;
		if(c<=0)
		{
			break;
		}
		if((v+a)<=v1)
		{
			v = v+a;
		}
		else
		{
			v = v1;
		}
		c = c+l;
	}
	cout<<ans<<endl;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int i=0;
    c=c-v0;
    i++;
    int o;
    while(c>0)
    {
        o=v0+(i)*a;
        if(o>=v1)
            o=v1,i++;
        else
            i++;
        c=c-o+l;
    }
    cout <<i<< endl;
    return 0;
}

#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

int n,v0,v1,a,m;

int main()
{
	int i,k = 0;
	scanf("%d%d%d%d%d",&n,&v0,&v1,&a,&m);

	int sum = v0;
	int v = v0+a;
	if (n <= v0)	k  = 1;
	else {
	for (i = 2;;i++){
		if (v <= v1)
		sum = sum - m + v;
		else sum = sum - m + v1;
		v = v + a;
		if (sum >= n)	break;
	}
}
	if (k == 1)
		printf("1");
	else
		printf("%d",i);

}

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cmath>

using namespace std;

int main()
{
    int c,v,v1,a,l,sum=0,num=0;
    scanf("%d %d %d %d %d",&c,&v,&v1,&a,&l);
    while(sum<c)
    {
        if(sum!=0)
            v+=a,sum-=l;
        if(v>v1)
            v=v1;
        sum+=v;
         num++;
    }
    printf("%d",num);

}

#include <bits/stdc++.h>

using namespace std;

int main(){
	int c,v0,v1,a,l;
	scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&l);
	int n=c;
	int ans=0;
	while(v0<v1 && n>0){
		if(n-v0<=0){
			printf("%d\n",ans+1);
			return 0;
		}
		n=n-v0+l;
		ans++;
		v0=v0+a;
	}
	while(n>0){
		if(n-v1<=0){
			printf("%d\n",ans+1);
			return 0;
		}
		n=n-v1+l;
		ans++;

	}
	printf("%d\n",ans);
	return 0;
	}

#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <stack>
#include <map>
#include <ctime>

using namespace std;

int main()
{
	int c, v0, v1, a, l;
	cin >> c >> v0 >> v1 >> a >> l;

	int k = 1;
	int sum = v0;
	int v = v0-l;
	while ((sum < c)&&(v<v1))
	{
		v = min(v1-l,v+a);
		sum += v;
		++k;
	}
//
	if (sum < c)
	{
		k += (c - sum) / (v1-l);
		if ((c - sum) % (v1-l))++k;
	}

	cout << k;

	//system("pause");
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int c,v0,v1,a,l,day=0;
    cin>>c>>v0>>v1>>a>>l;
    while(c>0)
    {
        c-=v0;day++;
        if(c<=0)
        break;
        if(v0+a>v1)
        v0=v1;
        else
        v0+=a;
        c+=l;

    }
    cout<<day;

}

#include <bits/stdc++.h>

using namespace std;

int main(void) {
  int c, v0, v1, a, l, total = 1;
  cin >> c >> v0 >> v1 >> a >> l;
  bool b = false;
  c -= v0;
  v0 += a;
  while (c > 0) {
    total++;
    if (!b) {
      if (v0 >= v1) {
        b = true;
        total--;
        continue;
      }
      c -= v0 - l;
      v0 += a;
    }
    if (b) {
      c -= v1 - l;
    }
  }
  cout << total;
}

#include<cstring>
#include<cstdio>
#define ll long long
#define fr(c,a,b) for(int c=a;c<=b;c++)
#define rf(c,a,b) for(int c=a;c>=b;c--)
const int Max=0x3f3f3f3f;
const int Min=-1;
int max(int x,int y){return x>y?x:y;}
int min(int x,int y){return x<y?x:y;}
int abs(int x){return x>0?x:-x;}
inline int read()
{
	int x=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
	return x*f;
}
inline void write(int x)
{
	if(x<0){putchar('-');x=-x;}
	if(x>9)write(x/10);
	putchar(x%10+'0');
}
int c=read(),v0=read(),v1=read(),a=read(),p=read(),day;
int main()
{
    c=c-v0;day=1;
	while(c>0)
	{
		day++;
		c-=min(v1,v0+(day-1)*a)-p;
    }
    write(day);
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int c, v0, v1, a,l;
	cin>>c>>v0>>v1>>a>>l;
	//k��������� �������, ����������� �������� ������, ������������ �������� ������, ��������� � ���������� �������, ������� ������������
	int ans=0;
	/*if(c==737&&v0==41&&v1==74&&a==12&&l==11)
	{
		cout<<13;
		return 0;
	}*/
	while(c>0)
	{
		c-=v0;
		ans++;
		if(v0+a<=v1)
		{
			v0+=a;
		}
		else
		{
			v0=v1;
		}
		if(c>0)
		{
			c+=l;
		}
	}
	cout<<ans;
	return 0;
}

#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int c, v0, v1, l, a;
	cin >> c >> v0 >> v1 >> a >> l;
	int day = 1;
	int pages = v0;
	if (pages < c)
	{
		while (pages < c)
		{
			day++;
			if (v0 + a <= v1)
			{
				v0 += a;
			}
			else
			{
				v0 = v1;
			}
			pages += v0 - l;
		}
	}
	cout << day;
}

#include <cstdio>
#include <iostream>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin >> c >> v0 >> v1 >> a >> l;
    int cnt=1;
    c-=v0;
    int ans=1;
    while(true)
    {
        if(c<=0)
        {
            break;
        }
        int tmp=cnt*a+v0;
        if(tmp>=v1) tmp=v1;
        c+=l;
        c-=tmp;
        if(c<=0)
        {
            ans++;
            break;
        }
        cnt++;
        ans++;
    }
    cout << ans << endl;
    return 0;
}

#include <iostream>
using namespace std;

int solve(int C, int V0, int V1, int A, int L) {
	//day == 1
	int day = 1;
	int currP = V0;
	if (currP >= C) return day;

	//day == 2 ~ k(v < v1) :
	int k = 0;
	if (A != 0) k = (V1 - V0) / A + 1;
	else k = 2000;

	int v = V0;
	day = 2;
	while (day <= k) {
		v += A;
		currP = currP - L + v;
		if (currP >= C) return day;

		day++;
	}

	//day == k+1 ~ : ������ V1�� ����
	v = V1;
	while (1) {
		currP = currP - L + V1;
		if (currP >= C) return day;

		day++;
	}
}

int main(void) {
	int Answer = 0;
	//freopen("Text.txt", "r", stdin);
	int C, V0, V1, A, L;
	cin >> C >> V0 >> V1 >> A >> L;

	Answer = solve(C, V0, V1, A, L);
	cout << Answer;
	return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;

int c, v1, v2, a, l;

int main() {
	int i = 0;

	cin >> c >> v1 >> v2 >> a >> l;
	while (c > 0) {
		c -= min(v1 + a * i, v2);
		if (i > 0) c += l;
		++i;
	}
	cout << i;
}

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

int main(){
    int c,v0, v1, a, l;
    cin>>c>>v0>>v1>>a>>l;
    int d=1;
    int r=v0;
    int t=v0;
    while(r<c){
        t += a;
        if(t>v1){
            t=v1;
        }

        r += t-l;
        d++;
    }

    cout<<d;

    return 0;
}

#include <iostream>
#include<set>
#include<map>
#include<cstdio>
using namespace std;
int main()
{
   	ios_base::sync_with_stdio(false);
   // freopen("in.txt","rt",stdin);
    int c,v0,v1,a,l,i=i,tong=0,dem=0;
    cin>>c>>v0>>v1>>a>>l;
    while(1)
    {

        if(tong>=c)
        {
            cout<<dem;return 0;
        }
        tong+=min(v0,v1);
        if(dem!=0)tong-=l;
        v0+=a;
        dem++;
    }
    return 0;
}

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
using namespace std;

int n, vMin, vMax, add, sub;

int main() {
	cin >> n >> vMin >> vMax >> add >> sub;

	int pos = 0, d = 0, v = vMin;

	for (int i = 0; pos < n; i++) {
		if (i)
			pos -= sub;
		pos += v;
		v = min(v + add, vMax);
		d++;
	}

	cout << d;
}

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

#define make(type, x) type x; cin >> x;
#define make2(type, x, y) type x, y; cin >> x >> y;
#define debug(x) cout << #x << " = " << x << endl;
#define debug2(x, y) cout << #x << " = " << x << endl; cout << #y << " = " << y << endl;
#define forn(i, from, to) for(int i = from; i < to; ++i)

int solve(){
  int c, v0, v1, a, l, d, cnt = 1;
  cin >> c >> v0 >> v1 >> a >> l;
  d = v0;
  while(d < c){
    d -= l;
    if(v0 + a <= v1)v0 += a;
    else v0 = v1;
    d += v0;
    cnt++;
  }
  printf("%d\n", cnt);
  return 1;
}

int tests = 1, test_item = 1;

int main(){
  //freopen("in", "r", stdin);
  //scanf("%d", &tests);
  while(tests--){
    //printf("Test #%d\n", test_item++);
    solve();
  }
  return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int c, v0, v1, a, l, pageplus, pageread, day = 1;

    cin >> c >> v0 >> v1 >> a >> l;

    pageread = v0;

    while (pageread < c) {
        day ++;
        pageplus = v0 + (day - 1)*a - l;
        if ((pageplus + l) > v1)
            pageplus = v1 - l;
        pageread += pageplus;
    }

    if (c == 0)
        cout << 0;
    else
        cout << day;

}

#include <iostream>
using namespace std;

int main() {
    int c,l,a,v0,v1,s,d=1;
    cin>>c;
    cin>>v0;
    cin>>v1;
    cin>>a;
    cin>>l;
    s=v0;
    for(d=1;s<c;d++)
    {

        if(v0+a<=v1)
        {
          v0=v0+a;
          s=s+v0-l;
        }
        else{ s=s+v1-l;
      }

    }
    cout<<d<<endl;
	return 0;\
}

#include <iostream>
using namespace std;

int c, v0, v1, a, l;

int main(){
    cin >> c >> v0 >> v1 >> a >> l;
    int res = 0;
    int tmp = 0;
    while (c > 0){
        if (res)
            c += l;
        if (v0 + res * a <= v1)
            tmp = v0 + res * a;
        else
            tmp = v1;
        c  -= tmp;
        res++;
    }
    cout << res;
    return 0;
}

#include <iostream>

int main(){
int ast,st,st1,a,l,d,ast2;
    ast2 = 0;
    d = 0;
    std::cin >> ast >>st>> st1>> a >> l;
    while (ast2 < ast){

        if (d >= 1){
            st += a;
        if ((st) >= st1){
        ast2 +=st1;
                    }
                else {ast2 += st;}
             ast2-=l;
              d++;

    }

if(d == 0){
ast2 += st;
d++;
}

if (ast2 >=ast)break;

}
std::cout << d;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define po pop_back
#define mp make_pair
#define FOR(i,a,b) for(long long int i=a;i<=b;i++)
#define NFOR(i,a,b) for(long long int i=a;i>=b;i--)
ll MOD=1000000007;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll c,v0,v1,a,l,i=1,s,add;
cin>>c>>v0>>v1>>a>>l;
s=v0;
if(s>=c)
{
    cout<<"1";
    return 0;
}
while(1)
{
    i++;
    add=v0+(a*(i-1));
    if(add>=v1)
    add=v1;
    s=s+add-l;
    if(s>=c)
    break;
}
cout<<i;
return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int c,v0,vm,a,l;
    scanf("%d%d%d%d%d",&c,&v0,&vm,&a,&l);
    int ans=0;
    int v=v0;

    if(v0>=c)
    {
        printf("1\n"); return 0;
    }

    int sum=0;
    while(1)
    {
      if(ans!=0)
      {
          if(sum<=l) { c+=sum;sum=0;}
          else { c+=l , sum-=l;}
      }
      c-=v;
      sum+=v;
      ans++;
      if(c<=0) break;
      if(v+a<=vm) v+=a;
      else v=vm;
    }
    printf("%d\n",ans);
    return 0;
}

//All the C++ libraries.
//#include <bits/stdc++.h>

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <string>
#include <algorithm>
#include <bitset>
using namespace std;

typedef pair<int, int> pii;
typedef pair<pii, int> piii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef long long ll;

#define sci(a)	scanf("%d",&a)
#define scii(a, b)	scanf("%d%d",&a, &b)
#define pri(a)	printf("%d\n",a)
#define prii(a, b)	printf("%d %d\n",a, b)

#define loop(n)          for(int i = 0; i < (n); i++)
#define lp(x, s, e)      for(int x = (s); x < (e); x++)
#define lpe(x, s, e)     for(int x = (s); x <= (e); x++)
#define iterate(v, i)    for(int i = 0; i < (v).size(); i++)

#define SetBit(x, bit)      ((x) |= 1 << (bit))
#define ClrBit(x, bit)      ((x) &= ~(1 << (bit)))
#define ToggleBit(x, bit)   ((x) ^= 1 << (bit))
#define ReadBit(x, bit)     (((x) & 1 << (bit)) != 0)

#define MP make_pair
#define PB push_back
#define all(a)   a.begin(),a.end()

#define clr(x, val)	memset((x), (val), sizeof(x))	//Not tested.

#define endl '\n'

int main()
{
    int pages, base, maxi, inc, re;
    cin >> pages >> base >> maxi >> inc >> re;

    int read = base;
    int days = 0;
    while(1)
    {
        days ++;
        pages -= read;
        if(pages <= 0)  break;

        pages += re;
        read += inc;
        if(read > maxi) read = maxi;
    }

    cout << days << endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
int c, v0, v1, a, l, cnt;

main()
{
	cin >> c >> v0 >> v1 >> a >> l;
	while (c > 0) {
		cnt++;
		c -= v0;
		v0 = min(v1, v0 + a);
		c += l * (c > 0);
	}
	cout << cnt;
}

#include<bits/stdc++.h>
#define loop(i, n) for(int i = 0; i < n; i++)
#define pb          push_back
#define ll          long long int
#define vi          vector<int>
#define pi          pair<int, int>
#define W(t)        int t; cin >> t; while(t--)
#define FIO         ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ff          first
#define ss          second
#define rep(i, a, b)for(ll i = a; i <= b; i++)

using namespace std;
const int mod = (int)(1e9+7);
vi read(int n){
    vi v(n);

    loop(i, n)
        cin >> v[i];
    return v;
}
void solve(){
    ll i, j, k, m, n, ans = 0, cnt = 0, sum = 0;

    ll c, v0, v1, l, a;
    cin >> c >> v0 >> v1 >>a >> l;

    ll day = 1;

    sum = min(v0, v1);

    i = 1;

    while(sum < c){
        sum += min(v0+i*a, v1)-l;
        day++;
        i++;
    }
    cout << day << "\n";
}
int main(){
    FIO

    #ifndef ONLINE_JUDGE
	freopen("C:/Codeforces/input.txt", "r", stdin);
	freopen("C:/Codeforces/output.txt", "w", stdout);
	#endif

    //W(t)
    solve();
    return 0;
}

#include<iostream>
#include<stdio.h>

using namespace std;

int main() {
    int c = 0,
        v0 = 0,
        v1 = 0,
        a = 0,
        l = 0;

    cin>>c>>v0>>v1>>a>>l;
    int res = 0;
    while(c>0) {
        c -= v0;
        if(res>0) {
            c+=l;
        }
        v0 = min(v0+a, v1);
        ++res;
    }

    cout<<res<<endl;
    return 0;
}

#include<iostream>
using namespace std;
main(){
int c, vo, l, a, v1,i,read,read1;
cin>>c>>vo>>v1>>a>>l;
for(i=0;c>0;i++){
    read=vo+i*a;
    if(read>v1)
        read=v1;
    if(i==0)
        c=c-vo;
    else if(i>0){
            if(l<=read1)
                 c=c-read+l;
            else
                c=c-read+read1;
    }
    read1=read;
}
cout<<i;
}

#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

#define fr first
#define sc second
#define r_0 return 0
#define ll long long
#define ppb pop_back
#define pb push_back
#define pf push_front
#define ppf pop_front
#define ld long double
#define TIME ios_base::sync_with_stdio(0);
#define foi freopen( "input.txt", "r", stdin );
#define foo freopen( "output.txt", "w", stdout );

using namespace std;

const ll N = 2e5 + 3;
const ll MN = 1e9;

void problem( ll c, ll v0, ll v1, ll a, ll l ){

    ll cnt = 0, p=0;

    while ( true ) {

        if ( c <= 0 ){
            break;
        }

        c -= v0;

        if( p >= 1 ){
            c += l;
        }

        v0 = min( v1, v0+a );

        cnt ++;
        p ++;
    }

    cout << cnt;

}

int main(){

    ll c, v0, v1, a, l;

    cin >> c >> v0 >> v1 >> a >> l;

    problem( c, v0, v1, a, l );

}

ll gcd( ll a, ll b ){
  if ( b == 0 )
    return a;
  else
    return gcd(b, a % b);
}

ll lcm ( ll a, ll b ){
  return a / gcd(a, b) * b;
}

void l_r( ll n ){

  ll a, c = 0, l, r, ans;

  vector<ll>v, d1, d2;

  for ( ll i = 0; i < n; i ++ ){
    cin >> a;
    v.pb( a );
  }

  d1.pb( v[0] );
  for ( ll i = 1; i < v.size(); i ++ ){
    d1.pb( d1[i-1] + v[i] );
  }

  d2.pb( v[n-1] );
  for ( ll i = v.size()-2; i >= 0; i -- ){
    d2.pb( d2[c] + v[i] );
    c ++;
  }

  cin >> l >> r;

  if ( l == 1 and r == n ){
    ans = 0;
  }else if ( l == 1 ){
    ans = d2[n-r-1];
  }else if ( r == n ){
    l --;
    ans = d1[l-1];
  }else{
    l --;
    ans = d1[l-1] + d2[n-r-1];
  }

  cout << ans;
}

#include <iostream>
using namespace std;
int main(){
	int c,v0,v1,a,l,d=1;
	cin>>c>>v0>>v1>>a>>l;
	c-=v0;
	while(c>0){
		if(v0+a<=v1) v0+=a;
		else v0=v1;
		c-=v0-l;
		d++;
	}
	cout<<d;
}

#include<iostream>
using namespace std;
int main()
{
    long long c,v,v1,a,l,sum=0,ct=1,x=0;
    cin>>c>>v>>v1>>a>>l;
    sum=v;
for(int i=1;sum<c;i++)
{
    x=v+i*a;
    if(x<v1){
    sum=sum+x-l;
    ct++;
    }
    else
    {
        x=v1;
        sum=sum+x-l;
        ct++;
    }
}
   cout<<ct;
}

//Jai Shree Krishna
#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int  ans = 1;
    int  curr = v0;
    while (curr<c) {
        v0 = min(v1,v0+a);
        curr+=(v0-l);
        ans+=1;
    }
    cout<<ans<<endl;

    return 0;
}

#include <iostream>
using namespace std;

int main()
{
	int c, v0, v1, a, l, j = 1;
	cin >> c >> v0 >> v1 >> a >> l;
	c -= v0;
	while (c>0)
	{
		if (v0 < v1)
		{
			v0 += a;
			if (v0 > v1)
				v0 = v1;
		}
		c += l;
		c -= v0;
		j++;
	}
	cout << j;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int cnt=0,m=0,n=0;
    while(c>0)
    {
        c+=m;   m=l;
        v0+=n;  n=a;
        if(v0>v1) {  v0=v1;  }
        c=c-v0;
        cnt++;
    }
    cout<<cnt;
}

#include <iostream>
#include <string.h>
using namespace std;
int main()
{
	int c,v0,v1,a,l;
	cin >> c >> v0 >> v1 >> a >> l;
	int cur=0,sp=v0,ans=0;
	while (cur<c)
	{
		ans++;
		cur+=sp;
		sp=min(sp+a,v1);
		if (cur>=c)
		break;
		cur-=l;
	}
	cout << ans;
}

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <cmath>
#include <queue>
#include <bitset>
#include <numeric>
#include <array>
#include <cstring>
#include <random>
#include <chrono>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {

  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  int c, v0, v1, a, l;

  cin >> c >> v0 >> v1 >> a >> l;

  int ans = 0;

  while(c > 0) {
    if(ans) c += l;
    c -= v0;
    v0 += a;
    v0 = min(v0, v1);
    ans++;
  }

  cout << ans;

  return 0;
}
/*

*/

#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define inp1(a) scanf("%lld",&a)
#define inp2(a,b) scanf("%lld%lld",&a,&b)
#define inp3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define inp4(a,b,c,d) scanf("%lld%lld%lld%lld",&a,&b,&c,&d)
//bool prime[100005];
/*int gcd(int a,int b)
{
    if(b==0)
        return a;
    else
        return gcd(b,a%b);
}*/
/*void sieve(int n)
{
    int i,j;
    for(i=2;i<=sqrt(n);i++)
    {
        if(prime[i]==true)
        {
            for(j=2*i;j<=n;j=j+i)
                prime[j]=false;
        }
    }
}*/
int main()
{
    long long int c,v0,v1,a,l,i,p,z,sum;
    cin>>c>>v0>>v1>>a>>l;
    z=0;
    i=0;
    p=0;
    while(p<c)
    {
        sum=v0+i*a;
        if(sum>v1)
            sum=v1;
        if(z==0)
            p=p+sum;
        else
                p=p+sum-l;
        i++;
        z=1;
    }
    cout<<i;
}

#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int c, v0, v1, a, l, t = 0,res = 0,co = 0;
	cin >> c >> v0 >> v1 >> a >> l;
	while (c>0)
	{
		if (res != 0) c += l;
		t = v0 + co*a;
		if (t > v1) t = v1;
		c -= t;
		res++; co++;
	}
	cout << res << endl;
	return 0;
}

//Problem: Mister B and Book Reading
#include<iostream>
using namespace std;
int main()
{
    //freopen("test.inp","r",stdin);
  // freopen("test.out","w",stdout);
	int c,v0,v1,a,l;
	cin>>c>>v0>>v1>>a>>l;
	int day = 1,cur=v0;
	if(v0 == c)
		cout<<day;
	else
	{
		while(cur < c)
		{
			day++;
			cur = cur - l;
			int add = v0 + (day-1)*a;
			if(add <= v1)
			{
				cur += add;
			}
			else
				cur += v1;
		}
		cout<<day;
	}

return 0;
}

#include<iostream>
using namespace std;
int main(void)
{
    int t,v0,v1,a,l,cur,v,first=1,day,add;
    cin>>t>>v0>>v1>>a>>l;
    day=cur=0;v=v0;
    while(cur<t)
    {

        if(!first)
        {
            if(v+a<v1)
                v+=a;
            else
                v=v1;
            add=v-l;
        }
        else
            add=v;
        cur+=add;
        ++day;
        first=0;
    }
    cout<<day<<endl;
}

///*Bismillahir Rahmanir Rahim***///
///**Author Thasin Sheikh**///
#include<bits/stdc++.h>
using namespace std;
long long int po[1005][10];
vector<int>primes;
#define MAX 35000
#define makefast__  ios_base::sync_with_stdio(false);
using ll=long long int  ;
using dl =double;
#include <bits/stdc++.h>
using namespace std;
int main()
{
    makefast__
    string ptr,str,ps;
    char ch,ch1,ch2;
    ll page,v0,a,v1,l,ans=0,c=0,p,flag,op=2;
    cin>>page>>v0>>a>>v1>>l;
    flag=page;
    ans=ans+v0;
    if(ans>=page&&v0<=a)
    {
        cout<<1<<endl;
        return 0;
    }
    else
    {
        p=min(v0,a);
        flag-=p;
        c++;
        ans=ans-p;
        flag+=l;
        ans+=v0+v1;
    }
    //cout<<c<<" "<<flag<<" "<<ans<<endl;
    while(flag>0)
    {
        flag=flag-min(ans,a);
       // cout<<flag<<endl;
        c++;
        if(flag<=0)
            break;
        else
        {
            flag+=l;
            ans=v0+op*v1;
            //cout<<ans<<endl;
            op++;
        }
    }
    cout<<c<<endl;

}

#ifdef __APPLE__
#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <cctype>
#include <stack>
#include <list>
#include <queue>
#include <map>
#include <sstream>
#include <cmath>
#include <limits>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <bitset>
#include <utility>
#include <set>
#include <numeric>
FILE *fin = freopen("./in.txt","r",stdin);
FILE *fout = freopen("./out.txt","w",stdout);
#else
#include<bits/stdc++.h>
#endif

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<vi> vvi;

#define lli long long int
#define ulli unsigned long long int

#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define cases int t;  cin>>t;   while(t--)
#define all(a) a.begin(),a.end()
#define sz(a) (int)(a.size())
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define loop(i,a,b) for(int i=a; i<b; i++)
#define check(a,n) loop(i,0,n) cout<<int(a[i])<<" "; cout<<endl

int gcd(int a, int b) {return b==0?a:gcd(b,a%b);}
int lcm(int a, int b) {return a*(b/gcd(a,b));}
lli power(lli x,  lli y)
{
    lli res = 1;

    while (y > 0)
    {
        if (y & 1)
            res = res*x;

        // n must be even now
        y = y>>1; // y = y/2
        x = x*x;  // Change x to x^2
    }
    return res;
}
#define INF 1000000000  //(10^9)
#define MOD 1000000007  //(10^9+7)

void solve() {
	int c,v0,v1,a,l,done,cur=1;
	cin>>c>>v0>>v1>>a>>l;
	done = 0;
	while(true) {
		done += min(v1, v0 + (cur-1)*a);
		if(done >=c) {
			cout<<cur;
			return ;
		}
		done -=l;
		cur++;
	}
}

int main() {
	fast_io;
  clock_t beg = clock();
  solve();
  clock_t end = clock();
  fprintf(stderr, "%.3f sec\n", double(end - beg) / CLOCKS_PER_SEC);
  return 0;
}

//Status :
//email:siriuslyra94@gmail.com

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair
#define umap unordered_map
#define ll long long
#define vsort(v) sort(v.begin(),v.end())
#define lcm(a,b) (a*b)/__gcd(a,b)

using namespace std;

typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main(){

	int c , v0 , vl , a ,l;

	cin>>c>>v0>>vl>>a>>l;

	int days = 1;

	c -= v0 ;

	int i = 1 ;

	while(c>0){

		c+=l;

		if(v0+i*a>vl)
			c-=vl;
		else
			c-= (v0+i*a);

		i++;

		days++;
	}

	cout<<days<<endl;

  return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int c,v0,v1,a,l;
	cin>>c>>v0>>v1>>a>>l;

	int r=l;
	int count=0;
	do
	{
		r+=v0;
		r-=l;
		v0=min(v0+a,v1);
		count++;
	}
	while(r<c);
	cout<<count;
	//system("pause");
	return 0;
}

 #include <bits/stdc++.h>

using namespace std;

char tab[1000];
int main()
{

int c,v0,v1,a,l;
cin>>c>>v0>>v1>>a>>l;
if (c<v0) {cout<<1;return 0;}
c=c-v0;

if (c==0) {cout<<1;return 0;}
int i=1;
while (c>0)
{
    int readed;
    if (v0+i*a<v1)
        readed=v0+i*a-l;
    else readed=v1-l;

    c=c-readed;

    if (c<=0)
        break ;
    i++;
}
cout<<i+1;

        }

#include <iostream>
using namespace std;
int main() {
    int c, v, vv, a , l;
    cin>>c>>v>>vv>>a>>l;
    int ans  = 0;
    int pages_readed = 0;
    while(pages_readed<c){
        if(pages_readed!=c and ans!=0){
            pages_readed-=l;
        }
        pages_readed += v;
        if(v+a <= vv){
            v+=a;
        }
        else{
            v = vv;
        }
        ans++;
    }
    cout<<ans;
    return 0;
}

#include <iostream>
#include <iomanip>
#include <string>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <math.h>
#include <cctype>
#include <climits>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <stdexcept>
#include <exception>
#include <fstream>
#include <algorithm>
#include <ios>
#include <bitset>
#include <sstream>
#include <set>
#include <list>
#include <unordered_map>
#include <unordered_set>

#define test 0
#define pi acos(-1.0)
#define eps 1e-8
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define ABS(x) (((x) > 0) ? (x) : (-(x)))
#define FOR(n) for(LL i = 0 ; i< n ;i++)
#define FOR1(L, R) for(LL i = L ; i <= R ; i++)
using namespace std ;

typedef int I ;
typedef short int SI ;
typedef long L ;
typedef long long LL ;
typedef unsigned long long ULL ;
typedef float F ;
typedef double D ;
typedef long double LD ;
typedef char C ;
typedef bool B ;
typedef string S ;
typedef vector<I> VI ;
typedef vector<I>::iterator VIT ;
typedef vector<L> VL ;
typedef vector<L>::iterator VLT ;
typedef vector<LL> VLL ;
typedef vector<LL>::iterator VLLT ;
typedef vector<C> VC ;
typedef vector<S> VS;
typedef vector<C>::iterator VCT ;
typedef pair<LL , LL> PLL;
typedef vector<PLL> VPLL;
typedef vector<VPLL> VVPLL;
typedef set<PLL>::iterator SPLLIT;
typedef unordered_map<C, VC> UMCVC;

template<typename a>
void SWAP(a &b, a &c)
{
    a d = b ;
    b = c ;
    c = d ;
}

LL power(LL a, LL b)
{
    LL result = 1 ;
    while(b)
    {
        if(b&1)
            result = a * result ;
        a *= a ;
        b >>= 1 ;
    }
    return result ;
}
LL gcd(LL a, LL b)
{
    while(b)
    {
        a = a % b;
        SWAP(a,b);
    }
    return a;

}

LL lcm(LL a, LL b)
{
    return (a * (b / gcd(a,b)));
}
int main()
{
#if test
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    LL c,v0,v1,a,l;
    scanf("%lld %lld %lld %lld %lld", &c, &v0, &v1, &a, &l);
    LL days = 1, result = v0;
    while(result < c)
    {
        v0 = MIN(v1, v0 + a);
        result -= l;
        result += v0;
        days++;
    }
    printf("%lld\n", days);
    return 0;
}

#include<bits/stdc++.h>
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define in insert
#define er erase
#define fr first
#define sc second
const int inf=INT_MAX;
const int nmax=1e5+5;
const int mod=1e9+7;
typedef long long ll;
using namespace std;
ll c,v0,v1,a,l,ans,nr;
int main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
    cin>>c>>v0>>v1>>a>>l;
    while(nr<c)
	{
	 ans++;
	 nr+=v0;
	 if(ans>1)nr-=l;
	 v0+=a;
	 if(v0>v1)v0=v1;
	}
	cout<<ans<<endl;
    return 0;
}

#include<stdio.h>
int main(){
	int c, v0, v1, a, l;
	scanf("%d %d %d %d %d",&c,&v0,&v1,&a,&l);
	int step = 0;
	int curr = 0;
	int v = v0;
	bool first = true;
	while(curr<c){
		if(first==true){
			curr+=v;
			first = false;
		}
		else{
	 		curr+=(v-l);
		}
		v+=a;
		if(v>=v1){
			v=v1;
		}

	 	step++;
	}
	printf("%d\n",step);
}

#include <iostream>
#include <cstdio>
using namespace std;

int solve(){

    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;

    int sum = v0;

    if( c <= sum){

        return 1;
    }

int i=1;

    while(i){

        int temp = v0 +  i * a;

        temp = min(temp, v1);
        sum += temp -l;

        if(c <= sum)
            return i+1;

    i++;

    }

}

int main() {

    cout<<solve()<<endl;

    return 0;
}

#include "iostream"
#include "cstdio"
#include "cstring"
#include "string"
using namespace std;
int c,v0,v1,a,l;
int main()
{
	cin>>c>>v0>>v1>>a>>l;
	if(c==0){
		cout<<"0"<<endl;
	}else{
		c=max(0,c-v0);
		int k=1;
		while(c>0){
			c+=l; v0=min(v0+a,v1);
			c-=v0; k++;
		}
		cout<<k<<endl;
	}
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

main () {
	int c,v0,v1,a,l,v,pg;
	cin>>c>>v0>>v1>>a>>l;
	int i;
	pg=0;
	for(i=1; ; i++) {
		v=v0+a*(i-1);
		if (v>v1) v=v1;
		pg+=v-l;
		if (i==1) pg+=l;
		if (pg>=c) break;
	}
	cout<<i<<endl;
}

#include<bits/stdc++.h>
using namespace std;
int main ()
 {
    int c,v,v1,a,l,ans=1,p=1,k,cop;
    cin>>c>> v >> v1 >> a >> l;
    cop=v;
    while(1){
    c=c-v;
    if(c<=0){
        cout<<ans<<endl;
    return 0;
    }
    else{
        v=cop+a*p;
        p++;
      v=min(v,v1);
      v=v-l;
        ans++;
    }
    }
 }

#include <bits/stdc++.h>

using namespace std;

int main() {
    int c, v, v0, a, l, __v;
    cin >> c >> v >> v0 >> a >> l;
    __v = v;

    int count = 1;
    while(__v < c) {
        count++;
        v = min(v + a, v0);
        __v = __v + v - l;
    }

    cout << count;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	int c,v0,v1,a,r;
	while(~scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&r)){
	 for(int i=1;;i++){
		  c=c-v0;
		  if(i>=2) c+=r;
		  v0+=a;
		  if(v0>=v1) v0=v1;
	   	if(c<=0) {printf("%d",i);return 0;}
	   }
	 }

}

#include <iostream>

using namespace std;

int main()
{
    int v,x=0,l,c,a,max_v,d=1,b=0; cin>>c>>v>>max_v>>a>>l;
    x=v;

    while (x<c)
    {
        if(v+a>max_v)
        {
            a=0;
            v=max_v;

        }

        v+=a;
        x=x+v-l;
        d++;

    }
    cout<<d;

return 0;}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int c,v0,v1,a,k;
    while(scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&k) != EOF)
    {
        int v2 = v0;
        int page = v0;
        if(page >= c)
        {
            printf("1\n");
            continue;
        }
        int i;
        int f1 = 0;
        for(i = 2;i <= 1000;i++)
        {
            v2 = v0 + (i - 1) * a - k;      ///第i天看的页数
            if(v2 > v1 - k)v2 = v1 - k;
            page += v2;
            ///printf("%d %d\n",v2,page);
            if(page >= c)
                break;
        }
        printf("%d\n",i);
    }
    return 0;
}

#include <bits/stdc++.h>
//For ordered_set
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define MOD 1000000007
#define test  \
    int t;    \
    cin >> t; \
    while (t--)
#define init(arr, val) memset(arr, val, sizeof(arr))
#define loop(i, a, b) for (int i = a; i < b; i++)
#define loopr(i, a, b) for (int i = a; i >= b; i--)
#define loops(i, a, b, step) for (int i = a; i < b; i += step)
#define looprs(i, a, b, step) for (int i = a; i >= b; i -= step)
#define ull unsigned long long int
#define ll long long int
#define P pair
#define PLL pair<long long, long long>
#define PII pair<int, int>
#define PUU pair<unsigned long long int, unsigned long long int>
#define L list
#define V vector
#define D deque
#define ST set
#define MS multiset
#define M map
#define UM unordered_map
#define mp make_pair
#define pb push_back
#define pf push_front
#define MM multimap
#define F first
#define S second
#define IT iterator
#define RIT reverse_iterator
#define FAST                          \
    ios_base::sync_with_stdio(false); \
    cin.tie();                        \
    cout.tie();
#define FILE_READ_IN freopen("input.txt", "r", stdin);
#define FILE_READ_OUT freopen("output.txt", "w", stdout);
#define all(a) a.begin(), a.end()
using namespace std;
// For ordered_set
using namespace __gnu_pbds;
template <typename T>
using ord_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
const ll maxn = 1e5;
const ll inf = 1e9;
const double pi = acos(-1);

void solve()
{
    ll c, v0, v1, a, l;
    cin >> c >> v0 >> v1 >> a >> l;
    c -= v0;
    int cnt = 1;
    int i = 1;
    while (c > 0)
    {
        if (v0 + i * a <= v1)
        {
            v0 += (i * a);
            c += l;
            c -= v0;
            cnt++;
        }
        else
        {
            c += l;
            c -= (v0);
            cnt++;
        }
        i++;
    }

    cout << cnt << "\n";
}

int main()
{
    int t = 1;
    //    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}

#include <bits/stdc++.h>
#include<bitset>
using namespace std;
#define bye return 0
#define oo 2139062143 // 127
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define F  first
#define S  second
#define EPS 1e-15
#define khod push_back
#define mod 1000000007
#define VAR(ID) ((ID)<<1)
#define NOTVAR(ID) (VAR(ID)|1)
#define NOT(ID) ((ID)^1)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<string> vs;
typedef map<int, int> mpii;
typedef map<ll, ll> mpll;
int dx[] = { 0, 1, -1, 0 };
int dy[] = { 1, 0, 0, -1 };

ll pw(ll b, ll p) {
	if (!p)
		return 1;
	ll sq = pw(b, p / 2);
	sq *= sq;
	if (p % 2)
		sq *= b;
	return sq;
}
const int N = 3e5+10 , M = N*2;
int idx = 1;
vi q;
int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
#ifndef ONLINE_JUDGE
	freopen("input.in", "r", stdin);
#endif
	/*ld n , a ;
	cin>>n>>a;
	ld ang = ((n-2)*180.0)/n;
	if(!((int)ang&1)&&!((int)n&1)&&(int)ang==ang){
		if(abs(ang-a)<abs((ang/2.0)-a)){
			cout<<"1 2 3\n";
		}else{
			cout<<"1 2 "<<(n/2)+2<<"\n";
		}
	}else cout<<"1 2 3\n";*/
	int c , v0 , v1 , a , l ;
	cin>>c>>v0>>v1>>a>>l;
	int d = 0 , i = 1, tot = v0;
	if(v0>=c){cout<<1;bye;}
	if(v0<=v1)d=1;
	else d=(v0/v1);
	while(1){
		if(tot>=c)break;
		int n = v0+(i*a);
		if(n<=v1)d++;
		else d+=(n/v1);
		n-=l;
		tot+=n;
		i++;
	}cout<<d;
	bye;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d,e,f=0,g,h,ans=0;
    cin>>a>>b>>c>>d>>e;
    ans=b;
    while(a>ans)
    {
        if(b<c)
        {
            b=b+d;
        }
        ans=ans+b-e;
        f++;
    }
    cout<<f+1<<endl;
}

#include<bits/stdc++.h>

using namespace std ;

int main()
{
    int c , v0 , v1 , a , l ;

    cin >>c >>v0 >>v1 >>a >>l ;

    int days =1 , i = 1 , speed = 0 ;
    c = c - v0  ;

    while( (c >0) )
    {

        if( a == 0  )
        {
            c = c - (v0 - l )   ;
            days ++ ;
        }

        else
        {
            speed = ( v0 + (i*a) ) - l  ;

            if( speed >= v1 )
            {
                speed = v1 - l ;
                c -= speed ;
                days++ ;
                i++ ;
            }

            else
            {
                 c -= speed ;
                 days ++ ;
                  i++ ;
            }
        }

       // cout <<"Days : " <<days <<" " <<speed <<" " <<c <<endl ;
    }

    cout <<days <<endl ;
    return 0 ;
}

#include "iostream"
#include "cstdio"
#include "cstring"
#include "string"
using namespace std;
int c,v0,v1,a,l;
int main()
{
	while(cin>>c>>v0>>v1>>a>>l){
	if(a==0){
		if(c%v0){
			cout<<((c/v0)+1)<<endl;
		}else{
			cout<<(c/v0)<<endl;
		}
		continue;
	}else{
	int num=(v1-v0)/a;
	int flag=0;
	int ans=1;
	if(v0>=c){
		flag=1; //ans++;
	}
	int cnt;
	for(int i=2;i<=num+1;i++){
		if(flag)  break;
		cnt=v0*i+(i-1)*i/2*a-l*(i-1);
		ans++;
		if(cnt>=c)  flag=1;
	}
	int tt=0;
	while(true){
		if(flag)  break;
		cnt+=(v1-l)*(++tt);
		ans++;
		if(cnt>=c)  flag=1;
	}
	cout<<ans<<endl;}
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int c,v0,v1,a,l,ct=0,z=0;
    cin>>c>>v0>>v1>>a>>l;
    ct=l;
  int d=0,tem;
    while(ct<c){
    	ct-=l;
    		tem=v0+a*z++;
    		if(tem>v1){
    			tem=v1;
    		}
    		ct+=tem;
    	d++;
    }
    cout<<d<<endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main() {

    int target=0;
    cin >> target;
    int initial;
    cin >>initial;
    int maxread;
    cin >>maxread;
    int inc;
    cin >>inc;
    int back;
    cin >>back;

    int total=initial;
    int daily=initial;
    int day=1;

    while (total<target)
    {
    if (daily+inc >= maxread){
        daily=(maxread-back);
    }
    else
    {
        daily=((daily+inc)-back);
    }
    total=total+daily;
    day=day+1;
    }
    cout<<day<<"\n";

    return 0;
}

#include<stdio.h>
int main()
{
    int c,v0,v1,a,l,i,j,sum=1;
    scanf("%d%d%d%d",&c,&v0,&v1,&a);
    if(v0==c){
        printf("1\n");
        return 0;
    }
    for(i=0;;i++){
        if(i*a>=v1)
            sum+=v0+v1-1;
        else
            sum+=v0+i*a-1;
        sum++;
        sum-=l;
        if(sum>=c)
            break;
    }
    printf("%d\n",i+2);
}

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

int main()
{
int c;
int v0,v1,a,l;
int day=0;
scanf("%d %d %d %d %d",&c,&v0,&v1,&a,&l);
if(c<=v0){
	printf("1\n");
	return 0;
}
else
while(c>0){
	c-=v0;
	v0+=a;
	if(v0>=v1)
	v0=v1;
	day++;

	if(day>=1&&l!=0&&c!=0){
		c+=l;
	}
}
printf("%d",day);
}

#include <bits/stdc++.h>

using namespace std ;

string s , s1 , s2 ;

map<string , vector<string> > mp ;

map<string , bool> mp1 ;

set<string> ss ;

set<int> len ;

void DFS(string node , int num)
{
    if(mp1[node])
        return ;

    mp1[node] = true ;

    num++;

    len.insert(num);

    for(int j=0; j<mp[node].size(); j++)
    {
        if(!mp1[mp[node][j]])
            DFS(mp[node][j],num);
    }
}

int c,v0,v1,l,i,a;

int main()
{
    ios_base::sync_with_stdio(0);
    /*
        cin >> n ;

        for(i=0; i<n; i++)
        {
            cin >> s >> s1 >> s2 ;

            ss.insert(s);
            ss.insert(s2);

            for(int j=0; j<s.length(); j++)
                s[j] = tolower(s[j]);
            for(int j=0; j<s2.length(); j++)
                s2[j] = tolower(s2[j]);

            mp[s].push_back(s2);
            mp[s2].push_back(s);
        }

        set<string> :: iterator it = ss.begin();

        while(it != ss.end())
        {
            DFS(*it,0);
            it++;
        }

        set<int> :: iterator it1 = len.end();

        cout << *it1 ;
    */

    int days = 0 , num = 0;

    cin >> c >> v0 >> v1 >> a >> l ;

    if(!a && !v0)
        return cout << 0 , 0 ;

    days = v0 ;
    num++;

    while(days < c)
    {
        if(a - l + v0 <= v1)
            days += a+v0-l;
        else
            days += v1-l;
        num++;
    }

    cout << num ;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9+21;
const long long LINF = (long long) 1e18;
const long double PI = 2 * acos((long double)0);
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
#define Mahmud main()
#define endl "\n"
#define MAX(a,b) a = max(a,b)
#define MIN(a,b) a = min(a,b)
#define SQR(x) ((LL)(x) * (x))
#define RESET(a,b) memset(a,b,sizeof(a))
#define alla(arr,n) arr,arr+n
#define sz(x) ((int)(x).size())
#define all(x) x.begin(),x.end()
#define pb push_back
///Debug
#define dbg1(x) std::cerr<<#x<<"="<<(x)<<endl;
#define dbg2(x,y) std::cerr<<#x<<"="<<(x)<<','<<#y<<"="<<(y)<<endl;
#define dbg3(x,y,z) std::cerr<<#x<<"="<<(x)<<','<<#y<<"="<<(y)<<','<<#z<<"="<<(z)<<endl;
#define dbgArr(arr,n) cerr<<#arr<<"=["; printArray(arr,n,0,93); cerr<<endl;
///traversing
#define rep(n) for(int i=0;i<n;++i)
#define trv(i,t) for(__typeof(t.begin()) i=t.begin();i!=t.end();++i)
///necessary functions
inline ll Int()
{
    ll _x=0,_tmp=1;
    char _tc=getchar();
    while( (_tc<'0'||_tc>'9')&&_tc!='-' ) _tc=getchar();
    if( _tc == '-' ) _tc=getchar(), _tmp = -1;
    while(_tc>='0'&&_tc<='9') _x*=10,_x+=(_tc-'0'),_tc=getchar();
    return _x*_tmp;
}
inline long double Double()
{
    long double d;
    scanf("%Lf",&d);
    return d;
}
ll lcm(ll a,ll b)
{
    return a/__gcd(a,b)*b;
}
int ton(string x)
{
    int y;
    std::istringstream ss(x);
    ss >> y;
    return y;
}
template<typename T>
string tostring(T x)
{
    ostringstream ss;
    ss << x ;
    return ss.str();
}

///Current Code vars
#define N 100010
int c,v0,v1,a,l;
int arr[N+1],brr[N+1];
///Current Code functions

string s;

void solve()
{
    cin>>c>>v0>>v1>>a>>l;
    int day = 1;
    int read = v0;
    int i = 1;
    for(;read<c;)
    {
        a = a*i;
        int rr = v0 + a;
        rr = min(rr,v1);
        read += rr;
        read -= l;
        i++;
        day++;
    }
    cout<<day<<endl;
}

int Mahmud
{
    // ios_base::sync_with_stdio(0); //cin.tie(0);
  //#ifdef _LOCAL_
    //freopen("in", "r", stdin);
    // freopen("out", "w", stdout);
  //while(1)
    solve();
  //#ifdef _LOCAL_
    //printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
  //#endif
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int i = 1,counter = 0, b = a,rp = v0;
    while(true)
    {
        counter++;
        c-=rp;
        if(i==2)
        cout<<c<<"C"<<rp<<"rp"<<endl;
        if(c <= 0)
            break;
        c+=l;
        b= a*i;
        rp = v0+b;
        if(rp > v1)
            rp = v1;

        i++;

    }
   cout<<counter<<endl;
    return 0;
}

#include <iostream>
using namespace std;

int main() {
  int c,f,u,a,l;
  cin>>c>>f>>u>>a>>l;

 int total=0,count=0;

 while(total<c){
     total+=f;

     if(f+a-l<=u)
     f+=a-l;

     count++;
 }

 cout<<count;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, i, c, v0, v1, a, l, res=1;
    cin >> c >> v0 >> v1 >> a >> l;
    c-=v0;
    while(c>0){
        v0+=a;
        v0-=l;
        if(v0>v1) {
            c-=v1-l;
        }
        else c-=v0;
        v0+=l;
        res++;
    }
    cout << res;
    return 0;
}

#include<iostream>
#include<cstdio>
#include<cstring>

#define N 1007

using namespace std;
int n,m,c,v1,v2,day;

int main()
{
	scanf("%d%d%d%d%d",&n,&v1,&v2,&c,&m);
	int now=v1;day=1;
	if(now>=n)
	{
		cout<<1<<endl;
		return 0;
	}
	while(now<=n)
	{
		now-=m;
		day++;v1+=c;
		v1=min(v1,v2);
		now+=v1;
	}
	printf("%d\n",day);
	return 0;
}

#include<stdio.h>
int main()
{
    int c,v0,v1,a,l,i,j,sum=0;
    scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&l);
    if(v0==c){
        printf("1\n");
        return 0;
    }
    for(i=0;;i++){
        if(i*a>=v1)
            sum+=v0+v1;
        else
            sum+=v0+i*a;
        sum++;
        sum-=l+1;
        if(sum>=c)
            break;
    }
    printf("%d\n",i+1);
}

#include <iostream>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    int vs,days=0,npr=0;

    cin>>c;    cin>>v0;    cin>>v1;    cin>>a;    cin>>l;

    vs=v0;
    do{
        npr+=vs;
        vs += a-l;
        days++;
    }while(c>npr);

    cout<<days;

    return 0;
}

#include "iostream"
#include "cstdio"
#include "cstring"
#include "string"
using namespace std;
int c,v0,v1,a,l;
int main()
{
	while(cin>>c>>v0>>v1>>a>>l){
	if(a==0){
		if((c-l)%(v0-l)){
			cout<<((c-l)/(v0-l)+1)<<endl;
		}else{
			cout<<((c-l)/(v0-l))<<endl;
		}
	}else{
	int num=(v1-v0)/a;
	int flag=0;
	int ans=1;
	if(v0>=c){
		flag=1; //ans++;
	}
	int cnt;
	for(int i=2;i<=num+1;i++){
		if(flag)  break;
		cnt=v0*i+(i-1)*i/2*a-l*(i-1);
		ans=i;
		if(cnt>=c)  flag=1;
	}
	int tt=0;
	while(true){
		if(flag)  break;
		cnt+=(v1-l);
		ans++;
		if(cnt>=c)  flag=1;
	}
	cout<<ans<<endl;}
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9+21;
const long long LINF = (long long) 1e18;
const long double PI = 2 * acos((long double)0);
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
#define Mahmud main()
#define endl "\n"
#define MAX(a,b) a = max(a,b)
#define MIN(a,b) a = min(a,b)
#define SQR(x) ((LL)(x) * (x))
#define RESET(a,b) memset(a,b,sizeof(a))
#define alla(arr,n) arr,arr+n
#define sz(x) ((int)(x).size())
#define all(x) x.begin(),x.end()
#define pb push_back
///Debug
#define dbg1(x) std::cerr<<#x<<"="<<(x)<<endl;
#define dbg2(x,y) std::cerr<<#x<<"="<<(x)<<','<<#y<<"="<<(y)<<endl;
#define dbg3(x,y,z) std::cerr<<#x<<"="<<(x)<<','<<#y<<"="<<(y)<<','<<#z<<"="<<(z)<<endl;
#define dbgArr(arr,n) cerr<<#arr<<"=["; printArray(arr,n,0,93); cerr<<endl;
///traversing
#define rep(n) for(int i=0;i<n;++i)
#define trv(i,t) for(__typeof(t.begin()) i=t.begin();i!=t.end();++i)
///necessary functions
inline ll Int()
{
    ll _x=0,_tmp=1;
    char _tc=getchar();
    while( (_tc<'0'||_tc>'9')&&_tc!='-' ) _tc=getchar();
    if( _tc == '-' ) _tc=getchar(), _tmp = -1;
    while(_tc>='0'&&_tc<='9') _x*=10,_x+=(_tc-'0'),_tc=getchar();
    return _x*_tmp;
}
inline long double Double()
{
    long double d;
    scanf("%Lf",&d);
    return d;
}
ll lcm(ll a,ll b)
{
    return a/__gcd(a,b)*b;
}
int ton(string x)
{
    int y;
    std::istringstream ss(x);
    ss >> y;
    return y;
}
template<typename T>
string tostring(T x)
{
    ostringstream ss;
    ss << x ;
    return ss.str();
}

///Current Code vars
#define N 100010
int c,v0,v1,a,l;
int arr[N+1],brr[N+1];
///Current Code functions

string s;

void solve()
{
    cin>>c>>v0>>v1>>a>>l;
    int day = 1;
    int read = v0;
    for(;read<c;read +=(v0+a))
    {
        int rr = min(day,v1);
        day++;
        read -= l;
        read = max(0,read);
    }
    cout<<day<<endl;
}

int Mahmud
{
    // ios_base::sync_with_stdio(0); //cin.tie(0);
  //#ifdef _LOCAL_
    //freopen("in", "r", stdin);
    // freopen("out", "w", stdout);
  //while(1)
    solve();
  //#ifdef _LOCAL_
    //printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
  //#endif
    return 0;
}

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

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	/* your code here */
	int c,l,v0,v1,a,v,days;
	days = 0;

	cin >> c >> v0 >> v1 >> a >> l;
	v = v0;
	if (a == 0) {
		while (c > 0) {
			int d = c / v;
			days += d;
			c -= d * v;
			if (c <= 0) {
				cout << days;
				return 0;
			}
			c += l * d;
		}
		cout << days;
	} else {
		while (v <= v1 && c > 0) {
			days++;
			c -= v;
			if (c <= 0) {
				cout << days;
				return 0;
			}
			c += l;
			v += a;
		}
		v = v1;
		if (v-l==1) {
			cout << c-v+1;
		}
		cout << ceil(((double)c - (double)v) / ((double)v-(double)l)) + 1;

		cout << days;
	}

	return 0;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int main()
{
    int c,v0,v1,l,a,i=1;
    scanf("%d %d %d %d %d",&c,&v0,&v1,&a,&l);
    while(1)
    {
        c=c-v0;
        if(c<=0)
            break;
        v0=v0+a*i;
        i++;
        if(v0>=v1)
          v0=v1;
        c=c+l*i;
    }
    printf("%d\n",i);
   return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define FFF freopen("in.txt","r",stdin);freopen("out.txt","w",stdout);
#define lson l,m,r<<1
#define rson m+1,r,r<<1|1
#define CLR(arr,val) memset(arr,val,sizeof(arr))
#define rep(i,l,r) for(ll i=l;i<r;i++)
typedef long long ll;
typedef pair<int,int>pii;
typedef pair<ll,ll>pll;
typedef pair<double,double>pdd;
typedef pair<double,int>pdi;
const int INF=0x3f3f3f3f;
const int MOD=1000000007;
#define maxn 1000010

int main()
{
//    ios::sync_with_stdio(false);
//    cin.tie(0);
//    #ifndef ONLINE_JUDGE
//    FFF
//    #endif // ONLINE_JUDGE
     int a,b,c,d,e;
     cin>>a>>b>>c>>d>>e;
     int ans=0;
     int t=0;
     while(t<a)
     {
         b+=ans*d;
         if(ans)
            t-=e;
         if(t<0)t=0;
         if(b>=c)
         b=c;
         t+=b;
         ans++;
     }
     cout<<ans<<endl;
     return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int d=0;int c,v0,v1,a,l;
  cin>>c>>v0>>v1>>a>>l;
  for(int i=0;i<c;i=i+v0)
  {
    if(d) i-=l;
    if(v0+(a*d)<=v1) i=i+(a*d);
    d++;

  }
  cout<<d<<endl;
}

#include "cstdio"
using namespace std;

int main()
{
	int c,v0,v1,a,l;
	int cnt = 0;
	scanf("%d %d %d %d %d", &c, &v0, &v1, &a, &l);
	if(v0 >= c)
		printf("1\n");
	else {
		cnt = 1;
		int sum = v0;
		int dayRead = v0;
		while(sum < c)
		{
			dayRead += cnt * a;
			int realRead = dayRead < v1 ? dayRead : v1;
			sum += realRead - l;
			cnt++;
		}
		printf("%d\n", cnt);
	}
	return 0;
}

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

#define ll long long
#define pb push_back
#define mp make_pair

bool isPrime(int n)
{
    // Corner cases
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n%2 == 0 || n%3 == 0) return false;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;

    return true;
}

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

	ll sum = b;
	if (sum>=a){
		cout<<1<<endl;
		return 0;
	}
	sum -= e;
	ll ans = 1;
	while(1){
		if (b+d<=c)
			sum += b+d;
		else
			sum += c;

		ans++;
		d += d;
		if (sum>=a){
			cout<<ans<<endl;
			return 0;
		}
		sum -= e;
	}
}

#include<iostream>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int cnt=c,day=0,spd=v0;
    cnt=cnt-spd;
    day++;
    spd+=a;
    while(cnt>0)
    {
        if(spd>v1)
            spd=spd-a;
        cnt=cnt-spd+l;
        spd+=a;
        day++;
    }
    cout<<day;
}

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

int c, v0, v1, a, l;

int main(){
	cin >> c >> v0 >> v1 >> a >> l;
	int start = 1, end = v0;
	int days = 1;
	int increase, it = 1;
	while(end < c){
		increase = v0 + (it * a);
		if(increase >= v1){
			increase = v1;
			l += (increase - v1);
		}

		int temp = start;
		start = end + 1, end = temp + increase;

		/// reread.
		start = start - l;
		end = end - l;

		//cout << start << ' ' << end <<  '\n'; 		//cout << increase << '\n';
		it++;

		days++;
	}
	cout << days;
	return 0;
}

#include<iostream>
#include<string>
#include<set>
#include<algorithm>
using namespace std;
int main()
{
    int c,v0,v1,a,s=0,l,x=0,y=1;
    cin>>c>>v0>>v1>>a>>l;
    int m=v0;
    for(int i=0;v0<c;i++)
    {
        x=i*a;
        s=m+x;
        if(s<=v1)
        {
            v0=v0+s;
        }
        else
        {
            v0=v0+v1;
        }
        if(i!=0)
        {
            v0=v0-l;
        }
        y++;

    }
    cout<<y;
}

/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;
#define all(v) (v).begin(),(v).end()

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//

int main()  {

	int c, v0, v1, a, l, day, page;
	cin >> c >> v0 >> v1 >> a >> l;
	if (c <= v0)  {
		printf("1\n");
	}
	else  {
		page = v0;
		day = 1;
		while (1)  {
			day++;
			page += (v0+a-l)%v1;
			a += a;
			if (page >= c)  break;
		}
		printf("%d\n", day);
	}
	return 0;
}

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

int main() {
	int c,v0,v1,a,l;
	int counter=1;
	int i=1;
	int read=0;
	cin>>c>>v0>>v1>>a>>l;
	int r=0;
	int temp=v0;
	read=v0;
	int temp2=temp-l;
	while(read<c)
	{
	  temp=v0+i*a-l;
	   if(temp<v1)
	   {//v0=temp;
	   read=read+temp;
	   i++;
	   counter++;
	   temp2=temp;
	   }
	   else
	{
		read=read+temp2;
		counter++;
	}
//	cout<<read<<endl;
	}
	cout<<counter;
	// your code goes here
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<long,long> pll;
typedef vector<string> vs;
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define ft first
#define sd second
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define F(i,n) for(ll i=0;i<n;i++)
#define Fk(i,k,n) for(ll i=k;i<n;i++)
#define R(i,n) for(ll i=n-1;i>=0;i--)
#define Rk(i,k,n) for(ll i=n-1;i>=k;i--)
ll MAXN=1000000;
int main(){
    long tot, today, maxTod, upd, mem ;
    // scanf("%ld %ld %ld %ld %ld",&c, &v0, &v1, &a, &l  );
    cin>>tot>> today>> maxTod>> upd>> mem ;

    // int today = v0;
    // cout<<"c="<<tot;
    int days = 0;
    while(tot>0){
        if(days==0){
            tot-=min(today,maxTod);
            today+=upd;

            days++;
            if(tot<=0){
                break;
            }
        }
        else{
            tot-=(today-mem);
            if(today+upd<maxTod){
                today+=upd;
            }
            days++;
            if(tot<=0){
                break;
            }
        }
    }
    cout<<days<<endl;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int c, v0, v1, a, l, kol = 1;

    cin >> c >> v0 >> v1 >> a >> l;
    c-=v0;

    while (c-v0>0) {
        if (v0+a <= v1) v0+=a;
        c = c + l - v0;
        kol++;

    }

    cout << kol << endl;

    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int c, v0, v1, a, l;

int ans, sum;

main()
{
   cin>>c>>v0>>v1>>a>>l;
   int i;
   for (i=1; i<=2000; ++i){int k=0;
        k=v0+(i-1)*a;
        if (i>1) k-=l;
        if (k>=v1) sum+=v1;
            else sum+=k;
        if (sum>=c) break;
   }
   cout<<i;

}

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

int main() {
	int c,v,v1,a,l,k=0;
	cin>>c>>v>>v1>>a>>l;

    while(v<v1)
    {
        c-=v;
        v+=(a-l);
        k++;
        if(c<=0)
        break;
    }
    if(c>0)
    while(c>0)
    {
        c=c-v;
        k++;
    }
    cout<<k<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int c,v,a,l,d,s;
int main(){
cin>>c>>s>>v>>a>>l;
for(d=1,c-=s;c>0;d++)s+=a,c-=min(s-l,v);
cout<<d;
}

#include <iostream>
using namespace std;

int c, v0, v1, a, l;

int main(){
    cin >> c >> v0 >> v1 >> a >> l;
    int res = 0;
    while (c > 0){
        if (res)
            c += l;
        if (v0 + res * a <= v1)
            v0 += res * a;
        c  -= v0;
        res++;
    }
    cout << res;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{

  int n,v0,v1,a,l,sum=0,cnt=0,c=0;
  bool y=false;
   cin>>n>>v0>>v1>>a>>l;
    for (int i=1 ;i<100000 ;i++){
      if (v0+(i*a-l)<=v1)
       {

         c++ ;
       }
       else if (v0+(i*a-l)>v1)
        {
            break ;
        }

    }
     if (c==0)
      c++;
     for (int i= 0 ;i<100000 ;i++){
         if ( sum>=n)
        break ;
         if ( i>0 ){ y=true ;}

        if ( i>=c) {i=c;}

       cnt++;
       sum+=v0+(i*a);
        if ( y==true)
         sum=sum-l;

       }
     cout<<cnt;

    return 0;
}

#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int c, v0, v1, a, l;
	int co = 0 , res =0;
	cin >> c >> v0 >> v1 >> a >> l;
	while (c > 0)
	{
		c -= v0 + (co*a);
		if (res != 0) c += l;
		if ((co * a) < v1)co++;
		res++;
	}
	cout << res << endl;

	return 0;
}

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    int c, v0, v1, a, i;

    cin >> c >> v0 >> v1 >> a >> i;

    int current_speed = v0;
    int counter = 0;

    while(c > 0) {
        if(current_speed == v0) {
            c -= current_speed;
            current_speed += a - i;
        } else if(current_speed + a - i <= v1) {

            c -= current_speed;
            current_speed += a - i;
        } else {
            c -= current_speed + i;
        }

        //cout << "rem : " << c << endl;
        //cout << "speed : " << current_speed << endl;

        counter++;
    }

    cout << counter << endl;
    return 0;
}

#include<iostream>
#include<stack>
#include<algorithm>
using namespace std;
int main()
{
 int c,v0,v1,a,l;
 cin>>c>>v0>>v1>>a>>l;
 int days=0;
 while(c>0)
 {
      days++;
     if(days==1)
        c-=v0;
        else{
     if((v0+(days*a))<=v1)
     {
         if((v0+((days-1)*a))>l)
         {c-=(v0+((days-1)*a))-l;}
         else
            continue;

     }
     else
        c-=v1-l;
        }

 }
 cout<<days;
}

#include <iostream>
#include <windows.h>
#include <vector>

using namespace std;

int main()
{
    int c,v0,v1,a,l,counter=0;
    cin>>c>>v0>>v1>>a>>l;
    while(v0<c){
        if(counter>=2){
            v0-=l;
        }
        if(v0<v1){
            v0+=a;
        }
        counter++;

    }
    cout<<counter<<endl;
    return 0;
}

#include <stdio.h>
#include <algorithm>
#define ll long long
using namespace std;
int main(void)
{
	int c, v0, v1, a, l;
	scanf("%d %d %d %d %d", &c, &v0, &v1, &c, &l);
	int pos = v0;
	int t = 1;
	int add = v0;
	while (pos < c)
	{
		add = min(v1, add + a);
		pos += add - l;
		t++;
	}
	printf("%d\n", t);
	return false;
}

#include <bits/stdc++.h>
#define int long long
#define endl "\n"
#define pb push_back;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) x.begin(), x.end()
#define vi vector<int>
using namespace std;
signed main()
{
    int c,v0,v1,a,l,ans=0,d=0,i=1;
    cin>>c>>v0>>v1>>a>>l;
    if(v0<=v1)
    {
        if(v0<l)
        {
             if(c%v0==0)
                    d=d+c/v0;
             else
                    d=d+c/v0+1;
        //d=d+ceil(c/v0);
        }
        else
        {
            while(ans<c)
            {
                ans=ans+v0-l;
                d++;
            }
        }
    }
    else
    {
    ans=ans+v0;
    d++;
    while(ans<c)
    {
        if(ans>=l)
        {
            if((v0+a*i-l)>=v1)
                    ans=ans+v1;
            else
                    ans=ans+v0+a*i-l;
        }
        else
        {
            if((v0+a*i)>=v1)
                    ans=ans+v1;
            else
                    ans=ans+v0+a*i;
        }
        i++;
        d++;
    }
    }
    cout<<d<<endl;
	return 0;
}

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

int main()
{
    int c,vo,vi,a,l;
    cin>>c>>vo>>vi>>a>>l;
    int s=vo;
    if(vo>=c)
    {cout<<1;exit(0);}
    for(int i=2;;i++)
    {   int t=vo+(i-1)*a+l>vi?vi-l:vo+(i-1)*a-l;
        s+=t;
        //cout<<s<<endl;
    if(s>=c)
    {cout<<i;break;}}
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main ()
{
    int c, v, v1, a, l;
    cin >> c >> v >> v1 >> a >> l;
    int s = v;
    int ct = 1;
    while (s < c)
    {
        if ((v+(ct*a) - 1)> v1)
        {
            s+= v1;
        }
        else
        s += v + (ct*a) - l;
        ct++;
    }
    cout << ct;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int sum,i=1,cnt=1;
    sum=min(v0,v1);
        v0-=l;
    while(sum<c)
    {
        if(v0+a*i>=v1)
            sum+=v1;
    else sum+=v0+i*a;

        cnt++;
        i++;

    }
    cout<<cnt<<endl;
    return 0;

}

#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
using namespace std;

int main () {
    //freopen("line1.in", "r", stdin);
    //freopen("line1.out", "w", stdout);
    ll c,v,v1,a,l;
    cin>>c>>v>>v1>>a>>l;
    ll i = 0, cnt=0;
    while(c>0) {
        cnt++;
        c-=v;
        if(c<=0) break;
        ll read = (a*i-l);
        if(read>v1) c-=v1;
        else c-=read;
        i++;
    }
    cout<<cnt;
    return 0;
}

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

//Macros
#define PI 3.14159265359
#define all(v) v.begin(),v.end()
#define sortva(v) sort(all(v))
#define sortvd(v) sort(v.rbegin(),v.rend())
#define sortaa(a,n) sort(a,a+n)
#define sortad(a,n) sort(a,a+n),reverse(a,a+n)
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define sfstr(v) scanf("%s", v);
#define sz(v) (int)v.size()
#define ndl puts("")
#define SS stringstream
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for (int i = a; i < (b); i++)
#define prec setprecision(n)
#define endl '\n'

//Short code
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pi;
typedef unsigned long long ull;
typedef long double ld;

int main ()
{
  #ifndef ONLINE_JUDGE
  	freopen ("input.txt","r",stdin);
  	//freopen ("output.txt","w",stdout);
  #endif

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int p=0, c,v,vv,a,l;

    cin>>c >>v >>vv >>a >>l;

    int i;
    for( i = 0; p<c ; i++ ){
    	int add = v + i*a;
		if(add <= vv) p += add;

    	p -= (i!=0)?l:0;

	}

	cout<<i;

  //fclose (stdin);
  //fclose (stdout);
  return 0;
}

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

int main() {
	int c,v0,v1,a,l;
	cin>>c>>v0>>v1>>a>>l;
    int day=0;
    while(c > 0)
    {
        day++;
        if(day == 1)
        {
            if(c-v0 <= 0)
            {
                break;
            }
            if(v0+a <= v1)
            {
                c=c-v0;
                v0=v0+a;
            }
            else
            {
                c=c-v0+l;
                v0=v1;
            }

        }
        else
        {
            if(c-v0+l <= 0)
            {
                break;
            }
            if(v0+a <= v1)
            {
                c=c-v0+l;
                v0=v0+a;
            }
            else
            {
                c=c-v0+l;
                v0=v1;
            }
        }

    }
    cout<<day;
	return 0;
}

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;

int main()
{
    int c , v0 , v1 ,a , l ;
    scanf("%d%d%d%d%d" ,&c ,&v0 ,&v1 ,&a ,&l) ;
    printf("%d\n" ,(c/v0)+(c%v0)) ;
    return 0 ;
}

#include<iostream>
using namespace std;
int main()
{
	//freopen("input.txt","rt",stdin);
	int c,v,v1,a,l,tong=0,k=0,dem=0,flag=0,flag2=0;
	cin>>c>>v>>v1>>a>>l;
	//tong=v;
	if(c==v)
	{
		cout<<1;
		return 0;
	}
	else
	{
		while(tong<c)
		{
			if(v+a*k>v1)
			{
				flag=1;
				k--;
				tong+=v+a*k;
			}
			tong+=v+a*k;
			if(k>0)
				tong-=l;
			if(flag==0)
				k++;
		}
	}
	cout<<k;
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;

static int c, v0, v1, a, l;

int main()
{
	while (scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&l)!=EOF)
	{
		int day = 0;
		int v = 0;
		int sum = 0;
		int cnt = 1;
		//1000 2 2 5 1 999
		while (sum < c)
		{
			if (v == 0) v = v0;
			else if (v + cnt *a - l > v1) v = v1 - l;
			else  v = v0 + (cnt++)*a - l;
			sum += v;
			//printf("%d %d\n", sum, day);
			day++;
		}

		printf("%d\n", day);
	}
	return 0;
}

#include<bits/stdc++.h>
#define reg(i,x) for(int i=0;i<x;i++)
using namespace std;
int main()
{
    int c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    int temp=v0,i=1;
    int count=0;
   while(c)
   {
       count++;
       c-=v0;
       v0=min(v0+a,v1);
       if(c<=0)
       {
           cout<<count;
           break;
       }
   }
}

#include <iostream>

using std::cin;
using std::cout;
using std::endl;

int main()
{
	short c = -1, v0 = -2, v1 = -3, a = -4, l = -5;
	cin >> c >> v0 >> v1 >> a >> l;

	short n_days = 1,
		  n_pages_read = v0;
	while (n_pages_read < c) {
		short n_pages_to_read_today_theoritical = v0 + n_days * a;
		n_pages_read += (n_pages_to_read_today_theoritical <= v1 ? n_pages_to_read_today_theoritical : v1) - l;
		++n_days;
	}

	cout << n_days << endl;

	//char ch;
	//while (cin >> ch)
	//	if (ch == 'q')
	//		break;
	return 0;
}

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

#define l0(i, n) for(i=0; i<n; ++i)

int main()
{

   int c, v0, v1, a, l, res;
   cin>>c>>v0>>v1>>a>>l;

   //c is total no. of pages
   //cumulative progress p on ith day = prev + v0 + (i-1)a - labs
   //check when p>=c
   //also if p > v1 at any point, make p = v1

   int p = v0;   //progress
   int curr;
   int flag = 0, i = 1;

   //no. of pages per day >= length of book
   if (v0 >= c)
   {
       cout<<1;
       return 0;
   }

   if (v1==v0)
  {

       res = ceil(c/v0);
       cout<<res;
       return 0;
   }

   while(1)
   {
       ++i;

       if (flag==0)
       {
           curr = v0 + (i-1)*a - l;
            if(curr>=v1)
            {
                curr = v1;
                flag = 1;
            }
       }
       else
           curr = v1;

       p += curr;

       if (p>=c)
       break;

   }

    res = i;

   cout<<res;

   return 0;
}

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
    int c,v0,v1,a,l;
    int ans,num;
    while(scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&l)!=EOF)
    {
        if(c/v0==1&&c%v0==0)
        {
            printf("1\n");
            break;
        }
        ans=0;
       for(int i=0;i<10000;i++)
       {
           v0+=i*a;
           if(v0>v1) v0=v1;
           if(i==0) c-=v0;
           else c-=(v0-l);
           if(c<1)
           {
               ans=i+1;
               break;
           }
       }
        printf("%d\n",ans);
    }
}

#include<stdio.h>
int main()
{
    int c,v0,v1,a,l,i,j,sum=0;
    while(scanf("%d%d%d%d%d",&c,&v0,&v1,&a,&l)!=EOF){
    sum=0;
    if(v0>=c){
        printf("1\n");
        continue;
    }
    for(i=0;;i++){
        if(i*a>=v1)
            sum+=v0+v1;
        else
            sum+=v0+i*a;
        sum++;
        sum-=l+1;
        if(sum>=c)
            break;
    }
    printf("%d\n",i+1);
    }
    return 0;
}

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

int main()
{
	map<char, int> m;
	string str;

	getline(cin, str);
	for(auto x: str){
		m[x]++;
	}
	int ans = m['B'];
	ans = min(ans, m['b']);
	ans = min(ans, m['u']/2);
	ans = min(ans, m['a']/2);
	ans = min(ans, m['s']);
	ans = min(ans, m['l']);
	ans = min(ans, m['r']);

	cout << ans << endl;

  	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int c,v,v1,a,l;
    cin>>c>>v>>v1>>a>>l;
    int p=v;
    int res=1;
    int t=v;
    while(p<c)
    {
        t+=a;
        if(t+l<v1)
            p+=t-l;
        else p+=v1-l;
        res++;
    }
    cout<<res<<endl;
}

#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>

#ifdef PRINTERS
#include "printers.hpp"
using namespace printers;
#define tr(a)		cerr<<#a<<" : "<<a<<endl;
#else
#define tr(a)
#endif

#define ll          long long
#define pb          push_back
#define mp          make_pair
#define pii         pair<int,int>
#define vi          vector<int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (int)x.size()
#define hell        1000000007
#define endl        '\n'
#define rep(i,a,b)	for(int i=a;i<b;i++)
#define rep1(i,b)	for(int i=1;i<=b;i++)
using namespace std;

void solve()
{
	int c,v,w,a,l;
	cin>>c>>v>>w>>a>>l;
	int count =0,i=0;
	if(c<=v) cout<<1<<endl;
	else{
	while(c>0){
		c=c-v;
		//cout<<c;
		count++;
		v=v+a;
        if(v>=w){v=w;}
        i++;
        if(i>=1)
        c=c+l;

	}
	cout<<count;}
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t=1;
	//cin>>t;
	while(t--){
		solve();
	}
	return 0;
}

#include<iostream>
#include<string>
#include<set>
#include<algorithm>
using namespace std;
int main()
{
    int c,v0,v1,a,s=0,l,x=0,y=1;
    cin>>c>>v0>>v1>>a>>l;
    int m=v0;
    for(int i=0;v0<c;i++)
    {
        x=i*a;
        s=m+x;
        if(s<=v1)
        {
            v0=v0+s;
        }
        else
        {
            v0=v0+v1;
        }
        v0=v0-l;
        y++;

    }
    cout<<y;
}

#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define inp1(a) scanf("%lld",&a)
#define inp2(a,b) scanf("%lld%lld",&a,&b)
#define inp3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define inp4(a,b,c,d) scanf("%lld%lld%lld%lld",&a,&b,&c,&d)
//bool prime[100005];
/*int gcd(int a,int b)
{
    if(b==0)
        return a;
    else
        return gcd(b,a%b);
}*/
/*void sieve(int n)
{
    int i,j;
    for(i=2;i<=sqrt(n);i++)
    {
        if(prime[i]==true)
        {
            for(j=2*i;j<=n;j=j+i)
                prime[j]=false;
        }
    }
}*/
int main()
{
    int c,v0,v1,a,l,i,p,z,sum;
    cin>>c>>v0>>v1>>a>>l;
    z=0;
    i=0;
    p=0;
    while(p<c)
    {
        sum=v0+i*a;
        if(z==1)
            sum=sum+l;
        if(sum>v1)
            sum=v1;
        if(z==0)
            p=p+sum;
        else
        {
            if(sum-2*l>0)
                p=p+sum-2*l;
        }
        i++;
        z=1;
    }
    cout<<i<<endl;
}

#include <bits/stdc++.h>
typedef long long lint;
using namespace std;

int main(){
    lint c, vo, v1, a, l, read = 0;
    scanf("%lld %lld %lld %lld %lld", &c, &vo, &v1, &a, &l);
    read += vo;
    lint i=1;
    while (read<c){
        if (i==1 && vo == 0)
            read += (vo + i*a);
        else if ((vo + i*a)-l > v1){
            read += v1;
        } else
            read += (vo + i*a) - l;
        i++;
    }
    printf("%lld\n", i);
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
	long long c, v0, v1, a, l;
	cin >> c >> v0 >> v1 >> a >> l;

	long long i = 1;
	long long sum = 0;
	while (sum < c)
	{
		if (i == 1)
		{
			sum += v0;

		}
		else
		{
			long long adding = v0 + (i - 1)*a + l;
			if (adding > v1)
			{
				sum += v1;
				if(l > v1)
				{
				    sum -= v1;
				}
				else
				{
				    sum -= l;
				}

			}
			else
			{
				sum += adding;
				sum -= l;
			}
		}
		i++;
	}
	cout << i-1 << endl;

	return 0;
}

#include<iostream>
using namespace std;
main()
{ int t=0,d=0,c,v,v1,a,l;
   cin>>c>>v>>v1>>a>>l;

   while(c>t)
   {
   d++;
     if(d==1)
     t=v;
     else
     {  if(t<v1)
     {   v=v-l+a;
         t=t+v;
	 }
	 else
	  t=t+v1-l;
	 }
   }
   if(c-t>0&&c-t<v1-l)
   cout<<d+1;
   else
   cout<<d;
}

#include<bits/stdc++.h>
typedef long long ll;
typedef long double ld;
#define sync ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define fi first
#define se second
#define sqr(a) ((a) * (a))

using namespace std;

int n, m, k;

int main()
{
    int v0, v1, c, l, a;
    cin >> c >> v0 >> v1 >> a >> l;

    int ans = 1;
    int cnt = v0;

    v0 += a;
    if (v0 > v1)
        v0 = v1;
    v0 -= l;
    while(cnt < c){
        ans++;
        cnt += v0;
        v0 += a;
        //cout << cnt << " " << v0 << endl;
    }

    cout << ans <<  endl;

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int c, v0, v1, a, l, ans = 0, i = 0, p = 0, r;

	cin >> c >> v0 >> v1 >> a >> l;

	while(c > 0 and i <= c)
	{
		if (c <= 0) break;

		if (v0 + (a*i) > v1)
			r = v1;
		else
			r = v0+(a*i);

		c-= r;
		c+=p;
		p = r;
		i++, ans++;
	}

	printf("%d\n" , ans);
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int c,v0,v1,a,l;
    cin >> c >> v0 >> v1 >> a >> l;
    int day = 1;
    int str = 0;
    v1 = v1-l;
    str = min(v0,v1);
 while (str < c)
    {
        str = str + min(v0,v1);
        day++;
        v0 = v0+a;
        cout << str << endl;
    }
    cout << day;
}

#include<stdlib.h>
#include<algorithm>
#include<stdio.h>
#include<string.h>
#include<time.h>
#include <cstdio>
#include <iostream>
#include <vector>
#define ll long long
#define int long long
#define inf 0x3f3f3f3f
#define mods 1000000007
#define modd 998244353
#define PI acos(-1)
#define fi first
#define se second
#define lowbit(x) (x&(-x))
#define mp make_pair
#define pb push_back
#define si size()
#define E exp(1.0)
#define fixed cout.setf(ios::fixed)
#define fixeds(x) setprecision(x)
#define IOS ios::sync_with_stdio(false);cin.tie(0)
 using namespace std;
inline ll read(){char c=getchar();ll f=1,x=0;while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+(c^'0');c=getchar();}return x*f;}
const int mod =1e7+7;
/*
int aa,bb,n,m;
struct Matrix {
  int a[13][13];
  Matrix() { memset(a, 0, sizeof a); }
  Matrix operator*(const Matrix &b) const {
    Matrix res;
    for (int i = 1; i <=n+2; ++i)
      for (int j = 1; j <=n+2; ++j)
        for (int k = 1; k <=n+2; ++k)
          res.a[i][j] = (res.a[i][j] + a[i][k] * b.a[k][j]) % mod;
    return res;
  }
} ans, base;

void init() {

    ans.a[1][1]=23;
    for(int i=2;i<=n+1;i++){
        ans.a[1][i]=read();
    }
    ans.a[1][n+2]=3;   //n+2 ÐÐ³õÊ¼¾ØÕó

 for(int i=1;i<=n+1;i++){
    base.a[1][i]=10;
    base.a[n+2][i]=1;
 }
 base.a[1][n+2]=0;
 base.a[n+2][n+2]=1;
 for(int i=2;i<=n+1;i++){

    for(int j=1;j<=n+1;j++){
        if(j>=i){
        base.a[i][j]=1;}
        else{
            base.a[i][j]=0;
        }
    }
 }

}

[p  1

 q  0]

void qpow(int b) {
  while (b) {
    if (b & 1) ans = ans * base;
    base = base * base;
    b >>= 1;
  }
}
*/

signed main() {
ll c,v0,v1,a,l;
c=read();
v0=read();
v1=read();
a=read();
l=read();// 复习
ll ans;
if(c<=v0){
    printf("1");
    return 0;
}
c=c-v0;
for(int i=2;;i++){
v0=min(v0+(i-1)*a,v1);
v0=v0-l;
c=c-v0;
if(c<=0){
        ans=i;
    break;
}

}

printf("%lld",ans);

return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long c,v0,v1,a,l,t,i,j,inf,sup,mid,cc;
int main()
{
    cin>>c>>v0>>v1>>a>>l;
    t=v0;
    i=0;
    while(t<c)
    {
        i++;
        if(i*a<=v1)
        {
            t+=v0+i*a-l;
        }
        else
        {
            t+=v0+v1-l;
        }
    }
    cout<<(i+1)<<endl;
    /*if(a!=0)
    {
        i=v1/a;
        t=(i+1)/2*(2*v0+i*a-l);
    }
    else i=c;
    if(t>c || a==0)
    {
        inf=0;
        sup=i;
        while(cc<100)
        {
            mid=(inf+sup)/2;
            if((mid+1)/2*(2*v0+mid*a-l)>c)sup=mid;
            else inf=mid+1;
            cc++;
        }
        cout<<mid+1<<" "<<(mid+1)/2*(2*v0+mid*a-l)<<endl;
    }
    else if(t<c)
    {
        inf=0;
        sup=c;
        while(cc<100)
        {
            mid=(inf+sup)/2;
            if(t+(mid+1)/2*(2*v0+mid*v1-l)>c)sup=mid;
            else inf=mid;
            cc++;
        }
        cout<<i+mid+1<<" "<<t+(mid+1)/2*(2*v0+mid*v1-l)<<endl;
    }
    else if(t==c)cout<<i+1<<endl;*/
}

#include <bits/stdc++.h>

using namespace std;
int main() {
	int paginas, v0, vMax, ace, reread, aux = 1;
	long long total = 0, cont = 0;
	cin >> paginas >> v0 >> vMax >> ace >> reread;
	total += v0;
	++cont;
	while(total < paginas) {
		total += (v0 + (aux*ace) - reread);
		++cont;
		if((v0 + ((aux+1)*ace) + reread) <= vMax)
			aux++;
	}
	cout << cont << endl;
	return 0;
}

#include <iostream>
using namespace std;
int i;
int main ()
{
	int c,v,v1,a,l,k=1;
	cin >> c >> v >> v1 >> a >> l;
	if ( v >= c )
	{
		cout << 1;
		return 0;
	}
	c-=v;
	while ( c >= 0 )
	{
		if ( v + a < v1 )
		{
			v += a;
			goto skip;
		}
		if ( v + a > v1 )
		{
			v = v1;
		}
		skip:;
		c-=v;
		if ( v <= 0 )
		{
			cout << k;
			return 0;
		}
		c+=l;
		k++;
	}
	cout << k;
}

#include<bits/stdc++.h>
#include <stack>
using namespace std;
#define MAXN 100010
typedef pair<int,int> PII;
#define getiii(a,b,c) getii(a,b),geti(c)
#define getii(a,b) geti(a),geti(b)
#define geti(a) scanf("%d",&a)
#define upi(a,b) for(int i=a;i<b;i++)
#define upj(a,b) for(int j=a;j<b;j++)
#define upk(a,b) for(int k=a;k<b;k++)
#define make_pair mp
#define pb push_back
bool cmpf(int &a,int &b)
{
	return(a>b);
}
int main()
{
	int c,v0,v1,a,l;	//c=no.f pages, vo=initial read pages, v1=max readable pages, a=no. of pages added l=last reread pages
	getiii(c,v0,v1);	//12 4 12 4 1,
	getii(a,l);
	int k=0;			//4,4+4-1=7+4=11,4+8-1=11
	int cnt=-1;
	int res=0,fl=0;
	while(k<=c)
	{
		if(fl==0)
		cnt++;
		if(a*cnt-l+v0<=v1&&fl==0)
		{
		if(cnt!=0)
		k+=v0+a*cnt-l;
		else
		k+=v0;
		res++;}
		else
		{
			fl=1;
			k+=v0+a*(cnt-1)-l;
			res++;
		}
		if(k>=c)
		{
			cout<<res<<'\n';
			return 0;
		}

	}
	cout<<res-1<<'\n';
}

#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);
#define ll long long  int
#define ld long double
#define mod 1000000007

int main(){
    fastio
    ll t = 0 ;
    ll c , vo , v1 , a,l;
    cin >> c >> vo >> v1 >> a >> l;
    ll count = 0 ;
    ll temp  = vo ;
    ll ans = 1 ;
    ll ans1 = 1;
    if(temp < v1)
        count = vo;
    else
        count = v1;
    while(count < c){
            ans++;
            if(a>0)
            temp=ans*a - l;
        else
            temp =1;
        //cout << temp ;
        if(temp<v1)
        {
            count+=temp;
        }
        else{
            temp = v1;
            count+=temp;
        }
                    ans1++;

        //cout << count <<endl;

    }
    cout << ans << endl;

}

#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#include<vector>

using namespace std;
//ifstream cin("input.txt");
//ofstream cout("output.txt");
struct niki
{
	int x, y;
};
int main() {
	long long n, v0, v1, a, l, z, c, k = 0,sum=0;
	string s;
	bool ;
	niki q[10];
	vector<int> ch, nch;
	cin >> c >> v0 >> v1 >> a >> l;
	if (c <= v0 || (v0==0 && a>=c)) {
		cout << 1;
		return 0;
	}
	while (sum + l < c )
	{
		if (k == 0)
			sum = v0;
		else if (a == 0)
			sum = sum + v0;
		else if (k*a > v1)
			sum = v0 - l + v1;
		else sum = v0 - l + k*a;
		k++;
	}
	if (k == 0)
		k++;
	cout << k;

//	system("pause");
	return 0;
}

//Jai Shree Krishna
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int arr[10010];

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    ll c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    //cout<<c<<" "<<v0<<" "<<v1<<" "<<a<<" "<<l<<endl;
    ll ans = 0;
    while (true) {
        ans+=1;
        if(ans==1)
        {
            ll  cool = v0;
            for(int i  =1;i<=c&&cool>0;i+=1)
            {
                if(arr[i]==0)
                {
                    arr[i] = 1;
                    cool-=1;
                }
            }
        }
        else{
            ll newlim = v1-l;
            ll toonice = v0+a*(ans-1);
            toonice = min(toonice,newlim);
            for(int i  =1;i<=c&&toonice>0;i+=1)
            {
                if(arr[i]==0)
                {
                    arr[i] = 1;
                    toonice-=1;
                }
            }

        }
        if(arr[c]==1)
        {
            cout<<ans;
            return 0;
        }

    }

    return 0;
}

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

int main()
{
int c;
int v0,v1,a,l;
int day=0;
scanf("%d %d %d %d %d",&c,&v0,&v1,&a,&l);
if(c<=v0){
	printf("1\n");
	return 0;
}
else
while(c>0){
	c-=v0;
	v0+=a;
	if(v0>v1)
	v0=v1;
	day++;

	if(day>1&&c!=0){
		c+=l;
	}
}
printf("%d\n",day);
}

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

  int main()
  {
     int c,v0,v1,a,l;
     cin >> c >>v0 >> v1 >> a>>l;
     int sum= v0, k=1;
     if (c==v0)
        cout << "1";
     else
     {
         while (sum<c)
         {
             k++;
             if(v0<v1)
             v0 = v0+a;
             else v0 = v0+v1;
             sum = sum+v0-l;
         }
         cout << k;
     }
  }

#include <iostream>
#include <vector>
#include <cmath>
#include <stdio.h>
#include <algorithm>
#include <iterator>
#include <climits>
#include <numeric>
#include <queue>

typedef long long ll;
typedef unsigned long long ull;

const ll MOD = 1000000007;

typedef std::vector<ll> vll;
typedef std::vector<ull> vull;

typedef std::vector<int> vi;
typedef std::vector<bool> vb;
typedef std::pair<ll,ll> pa;
typedef std::vector<pa> vpa;

typedef std::vector<vll> vvll;

int main()
{
	int c,v0,v1,a,l;
	std::cin>>c>>v0>>v1>>a>>l;

	int pages=c;
	int prevNum=-1;

	int cnt=0;
	while(pages>0)
	{
		++cnt;
		int numPages=0;
		if(prevNum==-1)
			numPages=v0;
		else{
			numPages=std::min(prevNum+a,v1);
			// numPages-=l;
		}
		pages=pages-(numPages);
		if(pages==0)
			break;
		pages+=l;
		// std::cout<<pages<<" "<<prevNum<<" "<<numPages<<std::endl;
		prevNum=numPages;
	}

	std::cout<<cnt<<std::endl;
	return 0;
}

/*#include <iostream>
#include <vector>
#include <cmath>
#include <stdio.h>
#include <algorithm>
#include <iterator>
#include <climits>
#include <numeric>
#include <queue>

typedef long long ll;
typedef unsigned long long ull;

const ll MOD = 1000000007;

typedef std::vector<ll> vll;
typedef std::vector<ull> vull;

typedef std::vector<int> vi;
typedef std::vector<bool> vb;
typedef std::pair<ll,ll> pa;
typedef std::vector<pa> vpa;

typedef std::vector<vll> vvll;

int main()
{
	int c,v0,v1,a,l;
	std::cin>>c>>v0>>v1>>a>>l;

	int pages=c;
	int prevNum=-1;

	int cnt=0;
	int ival=0;
	while(pages>0)
	{
		++cnt;
		int numPages=0;
		if(prevNum==-1)
			numPages=v0;
		else{
			numPages=std::min(v0-l+a*ival,v1);
		}
		pages=pages-(numPages);

		std::cout<<pages<<std::endl;
		prevNum=numPages;
		++ival;
	}

	std::cout<<cnt<<std::endl;
	return 0;
}
*/

#include <bits/stdc++.h>
using namespace std;
#define int long long
using ll=long long;
using vi=vector<int>;
using vl=vector<long long>;
using pii=pair<int,int>;
using pll=pair<long long,long long>;
#define ITR(i,c) for(auto i=begin(c);i!=end(c);++i)
#define FORE(x,c) for(auto &x:c)
#define REPF(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define REP(i,n) REPF(i,0,n)
#define REPR(i,n) for(int i=(int)(n);i>=0;--i)
#define REPW(i,n) for(i=0;i<(int)(n);++i)
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)
#define SZ(c) ((int)c.size())
#define CONTAIN(c,x) (c.find(x)!=end(c))
#define OUTOFRANGE(y,x,h,w) (y<0||x<0||y>=h||x>=w)
#define dump(...)
const int DX[9]={0,1,0,-1,1,1,-1,-1,0},DY[9]={-1,0,1,0,-1,1,1,-1,0};
#define INF (1001001001)
#define INFLL (1001001001001001001ll)
template<class T> ostream& operator << (ostream &os,const vector<T> &v) {
    ITR(i,v) os << *i << (i==end(v)-1 ? "" : " "); return os; }
template<class T> istream& operator >> (istream &is,vector<T> &v) {
    ITR(i,v) is >> *i; return is; }
template<class T> istream& operator >> (istream &is, pair<T,T> &p) {
        is >> p.first >> " " >> p.second; return is; }
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return 1;}return 0;}
//------------------------------------------------------------------------------
struct before_main_function {
    before_main_function() {
        #ifdef int
            #undef INF
            #define INF INFLL
            #define stoi stoll
        #endif
        cin.tie(0);ios::sync_with_stdio(false);
        cout<<setprecision(15)<<fixed;
    }
} before_main_function;
//------------------8<------------------------------------8<--------------------
signed main() {
    int c,l,v0,v1,a;
    cin>>c>>v0>>v1>>a>>l;
    int cur=v0;
    int sum=0;
    REP(k,900) {
        if(k>0) sum-=l;
        sum += cur;
        if(sum>=c) {
            cout<<k+1<<endl;
            return 0;
        }
        cur += a;
        if(cur>v1) cur=v1;
    }
    return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    int c, v, v_mx, a, l;
    cin >> c >> v >> v_mx >> a >> l;
    int d, cnt = 0;
    for (d = 1; cnt < c; d++) {
        if (d == 1) {
            cnt += v;
            v = min(v_mx, v + a);
        }
        else {
            //cnt -= l;
            v -= l;
            cnt += v;
            v = min(v_mx, v + a);
        }
        if (cnt >= c)
            break;
    }
    cout << d;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{//while(1)
{
    int l,u,v,a,r,i,j=0,k,t,s;
    cin>>l>>u>>v>>a>>r;s=u;
   while(s<l)
   {j++;
     t=u+(j*a);
     if(t+r>v)s=s+v-r;
     else s=s+t-r;//cout<<s<<endl;
     u=t;
   }
cout<<j+1<<endl;
}}

// Written by rraj001 :)
#include<iostream>
#include<math.h>
#include<string.h>
#include<map>
#include<vector>
#include<queue>
#include<stack>
#define inf 9999999999
#define ll long long
#define ld long double
#define mod 1000000007
#include<limits.h>
#include<algorithm>
#include<cstdio>
#define pb push_back
#define ff first
#define ss second
using namespace std;
int main()
{
    std::ios::sync_with_stdio(false);
    ll c,v0,v1,a,l;
    cin>>c>>v0>>v1>>a>>l;
    ll cnt=0;
    ll temp=0;
    ll i=0;
    while(1)
    {
        ll temp2=0;
        if(i!=0){temp-=l;}
        ll temp3=v1-l;
        temp2=v0+i*a;
        if(temp3<temp2)temp2=temp3;
        //if(temp2>v1)temp2=v1;
        temp+=temp2;
        cnt++;
        if(temp>=c)break;

    }
    cout<<cnt<<endl;

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main(){
	int c, v0, v1, a, l;
	cin >> c >> v0 >> v1 >> a >> l;
	c -= min(v0, v1);
	if (v1 < v0) v0 = v1;
	if (c <= 0){
		cout << 1;
		return  0;
	}
	int day = 1;
	while (c > 0){
		c += l;
		c -= min(v0 + a, v1);
		if (v1 <= v0 + a) a = 0;
		day++;
		a += a;
	}
	cout << day;
	return 0;
}

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

int main()
{
    int c,v0,v1,a,l,ans=0;
    cin>>c>>v0>>v1>>a>>l;
    int bas = v0;
    if(v0>=c){
        puts("1");
        return 0;
    }
    ans=1;
    int cc = v0;
    while(cc<c){
        int x = bas+a;
        x-=l;
        if(x>v1) x=v1;
        cc+=x;
        ans++;
        bas=x;
    }
    printf("%d\n", ans);
}

#include<iostream>
#include<iomanip>
#include<bitset>
#define B 100000000
using namespace std;
int c,v0,v1,a,l,nr;
int main()
{
    cin>>c>>v0>>v1>>a>>l;
    while(c!=0)
    {
        nr++;
        if(nr==1)
        {
            c-=v0;
        }
        else
            {
                v0+=a;
                v0-=l;
                if(v0>v1)
                    v0=v1;
                c-=v0;
            }
       // cout<<v0<<' ';
        if(c<0)
            c=0;
    }
    cout<<nr;
}

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

int main() {
	int c,v0,v1,a,l;
	cin>>c>>v0>>v1>>a>>l;
	int i=1,j=v0+a;
	c=c-v0;
	while(c>0)
	{

		if(j>=v1)
		{
			c-=(v1-l);
			j=v1;
			j+=a-l;

		}
		else
		{
		c-=j;
		j+=(a-l);
		}
		i++;

	}
	cout<<i;
	return 0;
}

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

int main()
{
	int a,c,u,v,w,l,k,j,s,som=1;
	cin>>c>>v>>w>>a>>l;
	s=v;
	u=v;

	if(a==0){
		u=u-l;
		c=c-v;
		som=som+c/u;
		if(c%u) som++;
	}else{

	while(s<c){

			u=u+a;
			if(u<w){
				som++;
				s=s+u-l;
			}else{
				u=w;
				u=u-l;
				c=c-s;
				som=som+c/u;
				if(c%u) som++;
				s=c;
			}

		}

}
	cout<<som;

	return 0;
}

#include<bits/stdc++.h>
#include <stack>
using namespace std;
#define MAXN 100010
typedef pair<int,int> PII;
#define getiii(a,b,c) getii(a,b),geti(c)
#define getii(a,b) geti(a),geti(b)
#define geti(a) scanf("%d",&a)
#define upi(a,b) for(int i=a;i<b;i++)
#define upj(a,b) for(int j=a;j<b;j++)
#define upk(a,b) for(int k=a;k<b;k++)
#define make_pair mp
#define pb push_back
bool cmpf(int &a,int &b)
{
	return(a>b);
}
int main()
{
	int c,v0,v1,a,l;	//c=no.f pages, vo=initial read pages, v1=max readable pages, a=no. of pages added, c=total pages l=last reread pages
	getiii(c,v0,v1);	//12 4 12 4 1,
	getii(a,l);
	int k=v0;
	int cnt=0;
	int res=1,fl=0;
	if(v0==c)
	{
		cout<<'1'<<'\n';
		return 0;
	}
	while(k<c)
	{
		if(fl==0)
		cnt++;
		if(k+a*cnt-l+v0<=v1)
		{
		k+=v0+a*cnt-l;
		res++;}
		else
		{
			fl=1;
			k+=a*(cnt-1)-l;
			res++;
		}

	}
	cout<<res<<'\n';
}

#include<bits/stdc++.h>
#define FastIO ios_base::sync_with_stdio(false)

using namespace std;

int main()
{
	long long c, v0, v1, a, l, n=0, d=1;
	cin >> c >> v0 >> v1 >> a >> l;
	long long m = v0;
	bool flag = true;

	if(v0 < c){
		while(m < c){
			d++;

			if((m+v0+((n+1)*a)-l) < v1){
				n++;
				m += v0+(n*a)-l;
			}
			else m += v0+(n*a)-l;
		}
		cout << d;
	}
	else cout << d;

	return 0;
}

#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);
#define ll long long  int
#define ld long double
#define mod 1000000007

int main(){
    fastio
    ll t = 0 ;
    ll c , vo , v1 , a,l;
    cin >> c >> vo >> v1 >> a >> l;
    ll count = 0 ;
    ll temp  = vo ;
    ll ans = 1 ;
    ll ans1 = 1;
    if(temp < v1)
        count = vo;
    else
        count = v1;
    while(count < c){
            //ans++;
            temp=ans*a - l+vo;
        //cout << temp ;
        if((temp+l+l)<v1)
        {
            count+=temp;
        }
        else{
            temp = v1;
            count+=temp;
        }
    if(count<l)
    {
       count=0;
       count+=temp+l;
    }
                    ans++;

       // cout << count <<endl;

    }
    cout << ans << endl;

}

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

int main() {
	int c,v0,v1,a,l;
	int counter=1;
	int i=1;
	int read=0;
	cin>>c>>v0>>v1>>a>>l;
	int r=0;
	int temp=v0;
	read=v0;
	int temp2=temp-l;
	while(read<c)
	{

	  temp=v0+i*a-l;
	if(temp>=c &&temp-c<v1)
	{
		counter++;break;
	}
	   if(temp<=v1)
	   {//v0=temp;
	   read=read+temp;
	   i++;
	   counter++;
	   temp2=temp;
	   }
	   else
	{
		read=read+temp2;
		counter++;
	}

//	cout<<read<<endl;
	}
	cout<<counter;
	// your code goes here
	return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main()
{
	int c,v0,v1,a,l;
	cin>> c >> v0 >> v1 >> a >> l;

	int ppd = max(0 , v0 - l);
	int cur_page = v0;

	int day = 1;
	while ( cur_page < c )
	{
		cur_page = max( cur_page + ppd , 0 );
		ppd = min( ppd + a, v1);
		day++;
	}
	cout << day << endl;
	return 0;
}

#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);
#define ll long long  int
#define ld long double
#define mod 1000000007

int main(){
    fastio
    ll t = 0 ;
    ll c , vo , v1 , a,l;
    cin >> c >> vo >> v1 >> a >> l;
    ll count = 0 ;
    ll temp  = vo ;
    ll ans = 1 ;
    ll ans1 = 1;
    if(temp < v1)
        count = vo;
    else
        count = v1;
    while(count < c){
            //ans++;
            if(a>0)
            temp=ans*a - l+vo;
        else
            temp =1;
        //cout << temp ;
        if((temp+l+l)<v1)
        {
            count+=temp;
        }
        else{
            temp = v1;
            count+=temp;
        }
                    ans++;

       // cout << count <<endl;

    }
    cout << ans << endl;

}

#include <iostream>

using namespace std;

int main()
{
    int c,v0,v1,a,l,cnt=0;
    cin>>c>>v0>>v1>>a>>l;
    while(c>0)
    {
        c=c-v0;
        cnt++;
        v0=min(v1,v0+(cnt*a));
    }
    cout<<cnt<<endl;
    return 0;
}