#include <bits/stdc++.h>
using namespace std;
#define ll long long int 
#define ar array
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define mx *max_element
#define mn *min_element
#define endl "\n"
#define fo(i,n) for(ll i=0;i<n;i++)
#define all(x) x.begin(),x.end()
#define sortall(x) sort(all(x))
#define precision cout<<fixed<<setprecision(10)
#define w(t) ll t;cin>>t;while(t--)
#define setbits(x) __builtin_popcountll(x)
const double pi=3.1415926535897932384626;
//const ll mod = 998244353;
const ll mod=1e9+7;
int main()
{
  IOS
  ll x,y,a,b;
  cin>>x>>y>>a>>b;
  ll c=0;
  while(1){
    if(x>1e9) break;
    if(x*a>x+b||(x*a)>=y)
        break;
    c++;
    x=x*a;
  }
  if(x>=y)
    cout<<c<<endl;
  else{
    ll p=(y-x);
    if(p%b==0)
        c+=(p/b-1);
    else
        c+=(p/b);
    cout<<c;
  }
  return 0;
}
#include <stdio.h>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>

using ll = long long int;
const int INF = (1<<30);
const ll INFLL = (1ll<<60);
const ll MOD = (ll)(1e9+7);

#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	a = (a<MOD)?a:(a-MOD);
	b = (b<MOD)?b:(b-MOD);
	a += b;
	a = (a<MOD)?a:(a-MOD);
}

int main(void){
	int n=1000,i,j,sx,sy,gx,gy,d;
	for(i=0; i<n; ++i){
		std::cin >> sx >> sy >> gx >> gy;
		if(gx > sx){
			for(j=sx; j<gx; ++j){
				std::cout << "D";
			}
		}else{
			for(j=gx; j<sx; ++j){
				std::cout << "U";
			}
		}
		if(gy > sy){
			for(j=sy; j<gy; ++j){
				std::cout << "R";
			}
		}else{
			for(j=gy; j<sy; ++j){
				std::cout << "L";
			}
		}
		std::cout << std::endl;
		std::cin >> d;
	}
	return 0;
}
