#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i,a,b) for (int i = a; i < b; i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
/*v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v*/

int main()
{
	ll fx, fy, tx, ty, n;
	string s;
	cin >> fx >> fy >> tx >> ty >> n >> s;
	using pll = pair<ll, ll>;
	vector<pll> v(n);
	pll prev = {0, 0};

	ll min_x = 0, max_x = 0, min_y = 0, max_y = 0;

	ll sx = (fx > tx ? -1 : 1);
	ll sy = (fy > ty ? -1 : 1);
	map<ll, ll> m;
	ll mx_pos = 0;
	for (ll i = 0; i < n; i++)
	{
		if (s[i] == 'U') prev.se++;
		if (s[i] == 'D') prev.se--;
		if (s[i] == 'R') prev.fi++;
		if (s[i] == 'L') prev.fi--;
		v[i] = prev;

		ll dx = sx * prev.fi;
		ll dy = sy * prev.se;

		ll curr = dx + dy + i;
		if (m.find(curr) == m.end())
		{
			m[curr] = i + 1;
		}
		else
		{
			m[curr] = min(m[curr], i + 1);
		}

		if (m.find(curr + 1) == m.end())
		{
			m[curr + 1] = i + 1;
		}
		else
		{
			m[curr + 1] = min(m[curr + 1], i + 1);
		}

//		cerr << "m[" << curr << "] = " << m[curr] << '\n';
		mx_pos = max(mx_pos, curr + 1);
	}

	prev.fi *= sx;
	prev.se *= sy;

	ll total_per_move = prev.fi + prev.se + n;

	if (total_per_move <= 0)
	{
		cout << -1;
		return 0;
	}

	// target dist
	ll goal = abs(fx - tx) + abs(fy - ty);

	ll tmp = goal - mx_pos;

	ll moves_to_make = tmp > 0 ? (tmp / total_per_move + ll(tmp % total_per_move != 0)) : 0;

	ll ans = moves_to_make * n;

	ll last_goal = goal - (moves_to_make * total_per_move);

	cerr << "mx_pos: " << mx_pos << '\n';
	cerr << "total_per_move: " << total_per_move << '\n';
	cerr << "goal: " << goal << '\n';
	cerr << "moves_to_make: " << moves_to_make << '\n';
	cerr << "ans: " << ans << '\n';
	cerr << "last_goal: " << last_goal << '\n';

	bool ass_fail = m.find(last_goal) == m.end();
	if (ass_fail)
	{
		assert(false);
		throw(100500);
	}

	cerr << "m[last_goal]: " << m[last_goal] << '\n';

	ll last_time = m[last_goal];

	ll final_ans = ans + last_time;

	cout << final_ans;
}


#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i,a,b) for (int i = a; i < b; i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
/*v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v*/

int main()
{
	ll fx, fy, tx, ty, n;
	string s;
	cin >> fx >> fy >> tx >> ty >> n >> s;
	using pll = pair<ll, ll>;
	vector<pll> v(n);
	pll prev = {0, 0};

	ll sx = (fx > tx ? -1 : 1);
	ll sy = (fy > ty ? -1 : 1);

	map<ll, ll> mx;
	map<ll, ll> my;
	map<ll, ll> m;

	mx[0] = 0;
	my[0] = 0;
	m[0] = 0;

	ll mx_pos = 0;
	for (ll i = 0; i < n; i++)
	{
		if (s[i] == 'U') prev.se++;
		if (s[i] == 'D') prev.se--;
		if (s[i] == 'R') prev.fi++;
		if (s[i] == 'L') prev.fi--;
		v[i] = prev;

		ll dx = sx * prev.fi;
		ll dy = sy * prev.se;

		ll curr;

		curr = dx + dy + i;
		if (m.find(curr) == m.end())
		{
			m[curr] = i + 1;
		}
		else
		{
			m[curr] = min(m[curr], i + 1);
		}

		if (m.find(curr + 1) == m.end())
		{
			m[curr + 1] = i + 1;
		}
		else
		{
			m[curr + 1] = min(m[curr + 1], i + 1);
		}

		curr = dx + i;
		if (mx.find(curr) == mx.end())
		{
			mx[curr] = i + 1;
		}
		else
		{
			mx[curr] = min(mx[curr], i + 1);
		}

		if (mx.find(curr + 1) == mx.end())
		{
			mx[curr + 1] = i + 1;
		}
		else
		{
			mx[curr + 1] = min(mx[curr + 1], i + 1);
		}

		curr = dy + i;
		if (my.find(curr) == my.end())
		{
			my[curr] = i + 1;
		}
		else
		{
			my[curr] = min(my[curr], i + 1);
		}

		if (my.find(curr + 1) == my.end())
		{
			my[curr + 1] = i + 1;
		}
		else
		{
			my[curr + 1] = min(my[curr + 1], i + 1);
		}

		mx_pos = max(mx_pos, dx + dy + i + 1);
	}

	prev.fi *= sx;
	prev.se *= sy;

	ll total_per_move = prev.fi + prev.se + n;

	// target dist
	ll goal = abs(fx - tx) + abs(fy - ty);

	if (total_per_move <= 0 && mx_pos < goal)
	{
		cout << -1;
		return 0;
	}

	ll tmp = goal - mx_pos;

	ll moves_to_make = tmp > 0 ? (tmp / total_per_move + ll(tmp % total_per_move != 0)) : 0;

	ll ans = moves_to_make * n;

	ll last_goal = goal - (moves_to_make * total_per_move);

	cerr << "mx_pos: " << mx_pos << '\n';
	cerr << "total_per_move: " << total_per_move << '\n';
	cerr << "goal: " << goal << '\n';
	cerr << "moves_to_make: " << moves_to_make << '\n';
	cerr << "ans: " << ans << '\n';
	cerr << "last_goal: " << last_goal << '\n';

	bool ass_fail = m.find(last_goal) == m.end();
	if (ass_fail)
	{
		assert(false);
		throw(100500);
	}

	ll last_time;

	if (abs(fx - tx) > abs(fx - ty))
	{
		last_time = mx[last_goal];
	}
	else if (abs(fx - tx) < abs(fx - ty))
	{
		last_time = my[last_goal];
	}
	else
	{
		last_time = m[last_goal];
	}
	ll final_ans = ans + last_time;

	cout << final_ans;
}


#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i,a,b) for (int i = a; i < b; i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
/*v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v*/

int main()
{
	ll fx, fy, tx, ty, n;
	string s;
	cin >> fx >> fy >> tx >> ty >> n >> s;
	using pll = pair<ll, ll>;
	vector<pll> v(n);
	pll prev = {0, 0};

	ll sx = (fx > tx ? -1 : 1);
	ll sy = (fy > ty ? -1 : 1);

	map<ll, ll> mx;
	map<ll, ll> my;
	map<ll, ll> m;

	mx[0] = 0;
	my[0] = 0;
	m[0] = 0;

	ll mx_pos = 0;
	for (ll i = 0; i < n; i++)
	{
		if (s[i] == 'U') prev.se++;
		if (s[i] == 'D') prev.se--;
		if (s[i] == 'R') prev.fi++;
		if (s[i] == 'L') prev.fi--;
		v[i] = prev;

		ll dx = sx * prev.fi;
		ll dy = sy * prev.se;

		ll curr;

		curr = dx + dy + i;
		if (m.find(curr) == m.end())
		{
			m[curr] = i + 1;
		}
		else
		{
			m[curr] = min(m[curr], i + 1);
		}

		if (m.find(curr + 1) == m.end())
		{
			m[curr + 1] = i + 1;
		}
		else
		{
			m[curr + 1] = min(m[curr + 1], i + 1);
		}

		curr = dx + i;
		if (mx.find(curr) == mx.end())
		{
			mx[curr] = i + 1;
		}
		else
		{
			mx[curr] = min(mx[curr], i + 1);
		}

		if (mx.find(curr + 1) == mx.end())
		{
			mx[curr + 1] = i + 1;
		}
		else
		{
			mx[curr + 1] = min(mx[curr + 1], i + 1);
		}

		curr = dy + i;
		if (my.find(curr) == my.end())
		{
			my[curr] = i + 1;
		}
		else
		{
			my[curr] = min(my[curr], i + 1);
		}

		if (my.find(curr + 1) == my.end())
		{
			my[curr + 1] = i + 1;
		}
		else
		{
			my[curr + 1] = min(my[curr + 1], i + 1);
		}

		mx_pos = max(mx_pos, dx + dy + i + 1);
	}

	prev.fi *= sx;
	prev.se *= sy;

	ll total_per_move = prev.fi + prev.se + n;

	// target dist
	ll goal = abs(fx - tx) + abs(fy - ty);

	if (total_per_move <= 0 && mx_pos < goal)
	{
		cout << -1;
		return 0;
	}

	ll tmp = goal - mx_pos;

	ll moves_to_make = tmp > 0 ? (tmp / total_per_move + ll(tmp % total_per_move != 0)) : 0;

	ll ans = moves_to_make * n;

	ll last_goal = goal - (moves_to_make * total_per_move);

	cerr << "mx_pos: " << mx_pos << '\n';
	cerr << "total_per_move: " << total_per_move << '\n';
	cerr << "goal: " << goal << '\n';
	cerr << "moves_to_make: " << moves_to_make << '\n';
	cerr << "ans: " << ans << '\n';
	cerr << "last_goal: " << last_goal << '\n';

	bool ass_fail = m.find(last_goal) == m.end();
	if (ass_fail)
	{
		assert(false);
		throw(100500);
	}

	ll last_time = -1;

	if (abs(fx - tx) > abs(fx - ty))
	{
		last_time = max(last_time, mx[last_goal]);
	}
	else
	{
		last_time = max(last_time, my[last_goal]);
	}

	last_time = max(last_time, m[last_goal]);

	ll final_ans = ans + last_time;

	cout << final_ans;
}


#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i,a,b) for (int i = a; i < b; i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
/*v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v*/

int main()
{
	ll fx, fy, tx, ty, n;
	string s;
	cin >> fx >> fy >> tx >> ty >> n >> s;
	using pll = pair<ll, ll>;
	vector<pll> v(n);
	pll prev = {0, 0};

	ll min_x = 0, max_x = 0, min_y = 0, max_y = 0;

	ll sx = (fx > tx ? -1 : 1);
	ll sy = (fy > ty ? -1 : 1);
	map<ll, ll> m;
	m[0] = 0;
	ll mx_pos = 0;
	for (ll i = 0; i < n; i++)
	{
		if (s[i] == 'U') prev.se++;
		if (s[i] == 'D') prev.se--;
		if (s[i] == 'R') prev.fi++;
		if (s[i] == 'L') prev.fi--;
		v[i] = prev;

		ll dx = sx * prev.fi;
		ll dy = sy * prev.se;

		ll curr = dx + dy + i;
		if (m.find(curr) == m.end())
		{
			m[curr] = i + 1;
		}
		else
		{
			m[curr] = min(m[curr], i + 1);
		}

		if (m.find(curr + 1) == m.end())
		{
			m[curr + 1] = i + 1;
		}
		else
		{
			m[curr + 1] = min(m[curr + 1], i + 1);
		}

		mx_pos = max(mx_pos, curr + 1);
	}

	prev.fi *= sx;
	prev.se *= sy;

	ll total_per_move = prev.fi + prev.se + n;

	// target dist
	ll goal = abs(fx - tx) + abs(fy - ty);

	if (total_per_move <= 0 && mx_pos < goal)
	{
		cout << -1;
		return 0;
	}

	ll tmp = goal - mx_pos;

	ll moves_to_make = tmp > 0 ? (tmp / total_per_move + ll(tmp % total_per_move != 0)) : 0;

	ll ans = moves_to_make * n;

	ll last_goal = goal - (moves_to_make * total_per_move);

	cerr << "mx_pos: " << mx_pos << '\n';
	cerr << "total_per_move: " << total_per_move << '\n';
	cerr << "goal: " << goal << '\n';
	cerr << "moves_to_make: " << moves_to_make << '\n';
	cerr << "ans: " << ans << '\n';
	cerr << "last_goal: " << last_goal << '\n';

	bool ass_fail = m.find(last_goal) == m.end();
	if (ass_fail)
	{
		assert(false);
		throw(100500);
	}

	cerr << "m[last_goal]: " << m[last_goal] << '\n';

	ll last_time = m[last_goal];

	ll final_ans = ans + last_time;

	cout << final_ans;
}


#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i,a,b) for (int i = a; i < b; i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
/*v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v*/

vector<ll> dx, dy;
ll fx, fy, tx, ty, n;
string s;

bool check(ll x)
{
	ll complete = x / n;
	ll last = x % n;

	ll on_x = complete * (dx[n - 1]);
	ll on_y = complete * (dy[n - 1]);
	if (last)
	{
		on_x += dx[last - 1];
		on_y += dy[last - 1];
	}

	ll need = abs(on_x - (tx - fx)) + abs(on_y - (ty - fy));

//	cerr << "x: " << x << ", last+n*complete: " << last + n * complete << ", need: " << need << '\n';

	return need <= last + n * complete;
}

ll bin_s(ll l, ll r)
{
	if (r - l <= 1)
	{
		if (check(l)) return l;
		if (check(r)) return r;
		return -1;
	}

	ll mid = (l + r) / 2;
	if (check(mid))
	{
		return bin_s(l, mid);
	}
	return bin_s(mid, r);
}

int main()
{
	cin >> fx >> fy >> tx >> ty >> n >> s;

	dx.resize(n);
	dy.resize(n);

	char up = 'U';
	char dw = 'D';
	char lf = 'L';
	char rg = 'R';

	if (tx < fx)
	{
		swap(tx, fx);
		swap(lf, rg);
	}

	if (ty < fy)
	{
		swap(ty, fy);
		swap(up, dw);
	}

	pair<ll, ll> prev = {0, 0};

	rep(i,0,n)
	{
		if (s[i] == up) prev.se++;
		if (s[i] == dw) prev.se--;
		if (s[i] == rg) prev.fi++;
		if (s[i] == lf) prev.fi--;

		dx[i] = prev.fi;
		dy[i] = prev.se;
//		cerr << "i: " << i << ", dx: " << dx[i] << ", dy: " << dy[i] << '\n';
	}

	ll ans = bin_s(0, 1e18);

	cout << ans;
}


#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i,a,b) for (int i = a; i < b; i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
/*v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v*/

int main()
{
	ll fx, fy, tx, ty, n;
	string s;
	cin >> fx >> fy >> tx >> ty >> n >> s;
	using pll = pair<ll, ll>;
	vector<pll> v(n);
	pll prev = {0, 0};

	ll min_x = 0, max_x = 0, min_y = 0, max_y = 0;

	ll sx = (fx > tx ? -1 : 1);
	ll sy = (fy > ty ? -1 : 1);
	map<ll, ll> m;
	ll mx_pos = 0;
	for (ll i = 0; i < n; i++)
	{
		if (s[i] == 'U') prev.se++;
		if (s[i] == 'D') prev.se--;
		if (s[i] == 'R') prev.fi++;
		if (s[i] == 'L') prev.fi--;
		v[i] = prev;

		ll dx = sx * prev.fi;
		ll dy = sy * prev.se;

		ll curr = dx + dy + i;
		if (m.find(curr) == m.end())
		{
			m[curr] = i + 1;
		}
		else
		{
			m[curr] = min(m[curr], i + 1);
		}

		if (m.find(curr + 1) == m.end())
		{
			m[curr + 1] = i + 1;
		}
		else
		{
			m[curr + 1] = min(m[curr + 1], i + 1);
		}

//		cerr << "m[" << curr << "] = " << m[curr] << '\n';
		mx_pos = max(mx_pos, curr + 1);
	}

	prev.fi *= sx;
	prev.se *= sy;

	ll total_per_move = prev.fi + prev.se + n;

	if (total_per_move <= 0)
	{
		cout << -1;
		return 0;
	}

	// target dist
	ll goal = abs(fx - tx) + abs(fy - ty);

	ll tmp = goal - mx_pos;

	ll moves_to_make = tmp > 0 ? (tmp / total_per_move + ll(tmp % total_per_move != 0)) : 0;

	ll ans = moves_to_make * n;

	ll last_goal = goal - (moves_to_make * total_per_move);

	cerr << "mx_pos: " << mx_pos << '\n';
	cerr << "total_per_move: " << total_per_move << '\n';
	cerr << "goal: " << goal << '\n';
	cerr << "moves_to_make: " << moves_to_make << '\n';
	cerr << "ans: " << ans << '\n';
	cerr << "last_goal: " << last_goal << '\n';

	assert(m.find(last_goal) != m.end());

	cerr << "m[last_goal]: " << m[last_goal] << '\n';

	ll last_time = m[last_goal];

	ll final_ans = ans + last_time;

	cout << final_ans;
}


#include <bits/stdc++.h>

#define FASTIO
#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define F first
#define S second
#define forEach(c) for (auto &it : c)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

vector<point> forecast;
ll n;
point p1, p2;

bool possible(ll m) {
    ll cnt = m / n;
    ll rem = m % n;
    ll distx = p1.x + forecast[rem].x + cnt * forecast[n].x;
    ll disty = p1.y + forecast[rem].y + cnt * forecast[n].y;
    ll dist = abs(distx - p2.x) + abs(disty - p2.y);
    return (dist <= m);
}

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    cin >> n;
    forecast.pb(point{0, 0});
    for (ll i = 0; i < n; i++) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                forecast.pb(point{0, 1});
                break;
            case 'D':
                forecast.pb(point{0, -1});
                break;
            case 'L':
                forecast.pb(point{-1, 0});
                break;
            case 'R':
                forecast.pb(point{1, 0});
                break;
            default:
                break;
        }
    }
    for (ll i = 1; i <= n; i++) {
        forecast[i] += forecast[i - 1];
    }

    ll l = 0, r = 1e18;
    while (r - l > 1) {
        ll m = (l + r) / 2;
        if (possible(m)) r = m;
        else l = m;
    }
    if (r > 5e17) r = -1;

    cout << r << endl;
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
    point sumDistCircle{0, 0};
    forEach(forecast) sumDistCircle += it;
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;
    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }
    p1 -= sumDistCircle;
    p1 -= sumDistCircle;
    days -= 2 * forecast.size();
    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
    for (ll i = 1; i < n; i++) {
        forecast[i] += forecast[i - 1];
    }
    point sumDistCircle = forecast[n - 1];
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;

    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }

    for (ll i = 0; i < 20; i++) {
        p1 -= sumDistCircle;
    }
    days -= 20 * forecast.size();

    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
    point sumDistCircle{0, 0};
    forEach(forecast) sumDistCircle += it;
    if ((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) {
        cout << -1 << "\n";
        return 0;
    }
    ll days;

    for (days = 0; ;) {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
//    for (ll i = 1; i < n; i++) {
//        forecast[i] += forecast[i - 1];
//    }
    point sumDistCircle = forecast[n - 1];
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;

    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }

    for (ll i = 0; i < 1; i++) {
        p1 -= sumDistCircle;
    }
    days -= 1 * forecast.size();

    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
//    for (ll i = 1; i < n; i++) {
//        forecast[i] += forecast[i - 1];
//    }
    point sumDistCircle = forecast[n - 1];
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;

    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }

    for (ll i = 0; i < 2; i++) {
        p1 -= sumDistCircle;
    }
    days -= 2 * forecast.size();

    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
    point sumDistCircle{0, 0};
    forEach(forecast) sumDistCircle += it;
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days;

    for (days = 0; ;) {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
    point sumDistCircle{0, 0};
    forEach(forecast) sumDistCircle += it;
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;
    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() + 1 >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }
    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
    point sumDistCircle{0, 0};
    forEach(forecast) sumDistCircle += it;
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;
    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }
    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
//    for (ll i = 1; i < n; i++) {
//        forecast[i] += forecast[i - 1];
//    }
    point sumDistCircle = forecast[n - 1];
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;

    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }

//    for (ll i = 0; i < 1; i++) {
//        p1 -= sumDistCircle;
//    }
//    days -= 1 * forecast.size();

    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define F first
#define S second
#define forEach(c) for (auto &it : c)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

vector<point> forecast;
ll n;
point p1, p2;

bool possible(ll days) {
    ll dist = 0;
    dist += (p2.x - p1.x + p2.y - p1.y);
    dist -= (days / (forecast.size() - 1) * forecast.back().x + forecast[days % (forecast.size() - 1)].x);
    dist -= (days / (forecast.size() - 1) * forecast.back().y + forecast[days % (forecast.size() - 1)].y);
    return days >= abs(dist);
}

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    cin >> n;
    forecast.pb(point{0, 0});
    for (ll i = 0; i < n; i++) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                forecast.pb(point{0, 1});
                break;
            case 'D':
                forecast.pb(point{0, -1});
                break;
            case 'L':
                forecast.pb(point{-1, 0});
                break;
            case 'R':
                forecast.pb(point{1, 0});
                break;
            default:
                break;
        }
    }
    for (ll i = 1; i <= n; i++) {
        forecast[i] += forecast[i - 1];
    }
    ll d = 0;
    ll k = 1;
    while ((!possible(k)) && (k < (1LL << 50))) k <<= 1;
    if (k == (1LL << 50)) {
        cout << "-1\n";
        return 0;
    }
    d = k;
    for (k /= 2; k > 0; k /= 2) {
        if (possible(d - k)) d -= k;
    }
    cout << d << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
//    for (ll i = 1; i < n; i++) {
//        forecast[i] += forecast[i - 1];
//    }
    point sumDistCircle = forecast[n - 1];
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;

    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }

    for (ll i = 0; i < 10; i++) {
        p1 -= sumDistCircle;
    }
    days -= 10 * forecast.size();

    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define FASTIO
//#define BZ
//#define PBDS
#define POINT

#ifndef BZ
#pragma GCC optimize "-O3"
#endif

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;

#ifdef POINT
using point = complex<ll>;
#define x real()
#define y imag()
#endif

#ifdef PBDS
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace __gnu_bpds::detail;
template <class T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#endif

#define pb push_back
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define forEach(c) for (auto &it : c)
#define loop while (true)

inline ll divUp(ll a, ll b) {
    return (a + b - 1)/b;
}

ll n;
vector<point> forecast;

ll dist = 0;

int main() {
#ifdef FASTIO
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
    point p1, p2;
    {
        ll x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        p1 = point{x1, y1};
        p2 = point{x2, y2};
    }
    dist = abs(p1.x - p2.x) + abs(p1.y - p2.y);
    cin >> n;
    forecast.resize(n);
    forEach(forecast) {
        char c;
        cin >> c;
        switch (c) {
            case 'U':
                it = point{0, 1};
                break;
            case 'D':
                it = point{0, -1};
                break;
            case 'L':
                it = point{-1, 0};
                break;
            case 'R':
                it = point{1, 0};
                break;
        }
    }
    point sumDistCircle{0, 0};
    forEach(forecast) sumDistCircle += it;
    if (((p2.x - p1.x  + p2.y - p1.y == -sumDistCircle.x - sumDistCircle.y) && p2.x - p1.x + p2.y - p1.y != 0) || (p2.x - p1.x == - sumDistCircle.x && sumDistCircle.x != 0) || (p2.y - p1.y == -sumDistCircle.y && sumDistCircle.y != 0)) {
        cout << -1 << "\n";
        return 0;
    }
    ll days = 0;
    loop {
        point newP = p1 + sumDistCircle;
        if (abs(p2.x - newP.x) + abs(p2.y - newP.y) - days - forecast.size() >= abs(p2.x - p1.x) + abs(p2.y - p1.y) - days) break;
        p1 += sumDistCircle;
        days += forecast.size();
    }
    for (ll i = 0; i < 100; i++) {
        p1 -= sumDistCircle;
    }
    days -= 100 * forecast.size();

    loop {
        p1 += forecast[days % forecast.size()];
        days++;
        if (abs(p2.x - p1.x) + abs(p2.y - p1.y) - days <= 0) break;
    }
    cout << days << "\n";
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
using llong = long long;
auto isz = [](const auto& c) { return int(c.size()); };
mt19937 rng((size_t) make_shared<char>().get());

#ifndef _LIB_FASTIO_
#define _LIB_FASTIO_

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"

/** Fast allocation */

#ifdef FAST_ALLOCATOR_MEMORY
	int allocator_pos = 0;
	char allocator_memory[(int)FAST_ALLOCATOR_MEMORY];
	inline void * operator new ( size_t n ) {
		char *res = allocator_memory + allocator_pos;
		allocator_pos += n;
		assert(allocator_pos <= (int)FAST_ALLOCATOR_MEMORY);
		return (void *)res;
	}
	inline void operator delete ( void * ) noexcept { }
	//inline void * operator new [] ( size_t ) { assert(0); }
	//inline void operator delete [] ( void * ) { assert(0); }
#endif

/** Fast input-output */

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
	if (buf_pos == buf_len) {
		buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
		if (buf_pos == buf_len)
			return 1;
	}
	return 0;
}

inline int getChar() {
	return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
	return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
	int c;
	while ((c = peekChar()) != -1 && c <= 32)
		buf_pos++;
	return c == -1;
}

inline void skipBlanks() {
	while (!isEof() && buf[buf_pos] <= 32U)
		buf_pos++;
}

inline int readChar() {
	int c = getChar();
	while (c != -1 && c <= 32)
		c = getChar();
	return c;
}

inline unsigned int readUInt() {
	int c = readChar();
	unsigned int x = 0;
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return x;
}

template <class T = int>
inline T readInt() {
	int s = 1, c = readChar();
	T x = 0;
	if (c == '-')
		s = -1, c = getChar();
	else if (c == '+')
		c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return s == 1 ? x : -x;
}

inline long long readLong() {
	return readInt<long long>();
}

inline double readDouble() {
	int s = 1, c = readChar();
	double x = 0;
	if (c == '-')
		s = -1, c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	if (c == '.') {
		c = getChar();
		double coef = 1;
		while ('0' <= c && c <= '9')
			x += (c - '0') * (coef *= 1e-1), c = getChar();
	}
	return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
	int c = readChar();
	while (c > 32)
		*s++ = c, c = getChar();
	*s = 0;
}

inline void readWord( string &s ) {
	s.clear();
	int c = readChar();
	while (c > 32)
		s += c, c = getChar();
}

inline bool readLine( char *s ) {
	int c = getChar();
	while (c != '\n' && c != -1)
		*s++ = c, c = getChar();
	*s = 0;
	return c != -1;
}

inline bool readLine( string &s ) {
	s.clear();
	int c = getChar();
	while (c != '\n' && c != -1)
		s += c, c = getChar();
	return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
	if (write_buf_pos == buf_size)
		fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
	write_buf[write_buf_pos++] = x;
}

inline void flush() {
	if (write_buf_pos) {
		fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
		fflush(stdout);
	}
}

template <class T>
inline void writeInt( T x, char end = 0, int output_len = -1) {
	if (x < 0)
		writeChar('-'), x = -x;

	char s[24];
	int n = 0;
	while (x || !n)
		s[n++] = '0' + x % 10, x /= 10;
	while (n < output_len)
		s[n++] = '0';
	while (n--)
		writeChar(s[n]);
	if (end)
		writeChar(end);
}

inline void writeWord( const char *s ) {
	while (*s)
		writeChar(*s++);
}

inline void writeWord(const string& s) {
	writeWord(s.c_str());
}

inline void writeDouble( double x, int output_len = 0) {
	if (x < 0)
		writeChar('-'), x = -x;
	int t = (int)x;
	writeInt(t), x -= t;
	writeChar('.');
	for (int i = output_len - 1; i > 0; i--) {
		x *= 10;
		t = std::min(9, (int)x);
		writeChar('0' + t), x -= t;
	}
	x *= 10;
	t = std::min(9, (int)(x + 0.5));
	writeChar('0' + t);
}

/** Buffer flusher */

static struct buffer_flusher_t {
	~buffer_flusher_t() {
		flush();
	}
} buffer_flusher;

/** Reader and writer */

struct fast_reader {
    fast_reader& operator>>(int& n) {
        n = readInt(); return *this;
    }
    fast_reader& operator>>(unsigned int& n) {
        n = readUInt(); return *this;
    }
    fast_reader& operator>>(llong& n) {
        n = readLong(); return *this;
    }
	fast_reader& operator>>(double& n) {
        n = readDouble(); return *this;
    }
	fast_reader& operator>>(float& n) {
        n = (float) readDouble(); return *this;
    }
    fast_reader& operator>>(string& s) {
        readWord(s); return *this;
    }
    fast_reader& operator>>(char& c) {
        c = (char) readChar(); return *this;
    }
    template<typename T>
    fast_reader& operator>>(vector<T>& a) {
        for (T& i : a) {
            (*this) >> i;
        }
        return *this;
    }
} f_reader;

struct fast_writer {
    template<typename T>
    fast_writer& operator<<(T n) {
        writeInt(n); return *this;
    }
	fast_writer& operator<<(double n) {
		writeDouble(n); return *this;
	}
	fast_writer& operator<<(float n) {
		writeDouble(n); return *this;
	}
    fast_writer& operator<<(const string& s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(const char* s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(char c) {
        writeChar(c); return *this;
    }
    template<typename T>
    fast_writer& operator<<(const vector<T>& a) {
        for (size_t i = 0; i < a.size(); ++i) {
            if (i) {
                (*this) << ' ';
            }
            (*this) << a[i];
        }
        return *this;
    }
    void flush() {
        ::flush();
    }
} f_writer;

#define cin f_reader
#define cout f_writer

#pragma GCC diagnostic pop
#endif //_LIB_FASTIO_

int main(int argc, char** argv) {
#ifdef VSE
    if (argc > 1) assert(freopen(argv[1], "r", stdin));
    rng.seed(0);
#endif
#ifndef cin
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#endif

    llong x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    int n;
    string s;
    cin >> n >> s;

    auto getd = [&]() {
        return abs(x1 - x2) + abs(y1 - y2);
    };

    auto move = [&](char c) {
        if (c == 'U') {
            y1++;
        } else if (c == 'D') {
            y1--;
        } else if (c == 'L') {
            x1--;
        } else {
            x1++;
        }
    };

    llong d = getd();
    llong ox = x1, oy = y1;
    for (int i = 0; i < n; i++) {
        move(s[i]);
    }
    llong cd = getd();
    if (cd - d == n) {
        cout << -1;
        return 0;
    }

    llong x = d - (cd - n);
    llong ans = 0;
    if (x < d) {
        llong t = d / x - 1;
        t = max(t, 0LL);
        ans = t * n;
        x1 = ox + (x1 - ox) * t;
        y1 = oy + (y1 - oy) * t;
    } else {
        x1 = ox;
        y1 = oy;
    }

    while (getd() > ans) {
        move(s[ans % n]);
        ans++;
    }

    cout << ans << "\n";

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
using llong = long long;
auto isz = [](const auto& c) { return int(c.size()); };
mt19937 rng((size_t) make_shared<char>().get());

#ifndef _LIB_FASTIO_
#define _LIB_FASTIO_

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"

/** Fast allocation */

#ifdef FAST_ALLOCATOR_MEMORY
	int allocator_pos = 0;
	char allocator_memory[(int)FAST_ALLOCATOR_MEMORY];
	inline void * operator new ( size_t n ) {
		char *res = allocator_memory + allocator_pos;
		allocator_pos += n;
		assert(allocator_pos <= (int)FAST_ALLOCATOR_MEMORY);
		return (void *)res;
	}
	inline void operator delete ( void * ) noexcept { }
	//inline void * operator new [] ( size_t ) { assert(0); }
	//inline void operator delete [] ( void * ) { assert(0); }
#endif

/** Fast input-output */

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
	if (buf_pos == buf_len) {
		buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
		if (buf_pos == buf_len)
			return 1;
	}
	return 0;
}

inline int getChar() {
	return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
	return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
	int c;
	while ((c = peekChar()) != -1 && c <= 32)
		buf_pos++;
	return c == -1;
}

inline void skipBlanks() {
	while (!isEof() && buf[buf_pos] <= 32U)
		buf_pos++;
}

inline int readChar() {
	int c = getChar();
	while (c != -1 && c <= 32)
		c = getChar();
	return c;
}

inline unsigned int readUInt() {
	int c = readChar();
	unsigned int x = 0;
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return x;
}

template <class T = int>
inline T readInt() {
	int s = 1, c = readChar();
	T x = 0;
	if (c == '-')
		s = -1, c = getChar();
	else if (c == '+')
		c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return s == 1 ? x : -x;
}

inline long long readLong() {
	return readInt<long long>();
}

inline double readDouble() {
	int s = 1, c = readChar();
	double x = 0;
	if (c == '-')
		s = -1, c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	if (c == '.') {
		c = getChar();
		double coef = 1;
		while ('0' <= c && c <= '9')
			x += (c - '0') * (coef *= 1e-1), c = getChar();
	}
	return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
	int c = readChar();
	while (c > 32)
		*s++ = c, c = getChar();
	*s = 0;
}

inline void readWord( string &s ) {
	s.clear();
	int c = readChar();
	while (c > 32)
		s += c, c = getChar();
}

inline bool readLine( char *s ) {
	int c = getChar();
	while (c != '\n' && c != -1)
		*s++ = c, c = getChar();
	*s = 0;
	return c != -1;
}

inline bool readLine( string &s ) {
	s.clear();
	int c = getChar();
	while (c != '\n' && c != -1)
		s += c, c = getChar();
	return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
	if (write_buf_pos == buf_size)
		fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
	write_buf[write_buf_pos++] = x;
}

inline void flush() {
	if (write_buf_pos) {
		fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
		fflush(stdout);
	}
}

template <class T>
inline void writeInt( T x, char end = 0, int output_len = -1) {
	if (x < 0)
		writeChar('-'), x = -x;

	char s[24];
	int n = 0;
	while (x || !n)
		s[n++] = '0' + x % 10, x /= 10;
	while (n < output_len)
		s[n++] = '0';
	while (n--)
		writeChar(s[n]);
	if (end)
		writeChar(end);
}

inline void writeWord( const char *s ) {
	while (*s)
		writeChar(*s++);
}

inline void writeWord(const string& s) {
	writeWord(s.c_str());
}

inline void writeDouble( double x, int output_len = 0) {
	if (x < 0)
		writeChar('-'), x = -x;
	int t = (int)x;
	writeInt(t), x -= t;
	writeChar('.');
	for (int i = output_len - 1; i > 0; i--) {
		x *= 10;
		t = std::min(9, (int)x);
		writeChar('0' + t), x -= t;
	}
	x *= 10;
	t = std::min(9, (int)(x + 0.5));
	writeChar('0' + t);
}

/** Buffer flusher */

static struct buffer_flusher_t {
	~buffer_flusher_t() {
		flush();
	}
} buffer_flusher;

/** Reader and writer */

struct fast_reader {
    fast_reader& operator>>(int& n) {
        n = readInt(); return *this;
    }
    fast_reader& operator>>(unsigned int& n) {
        n = readUInt(); return *this;
    }
    fast_reader& operator>>(llong& n) {
        n = readLong(); return *this;
    }
	fast_reader& operator>>(double& n) {
        n = readDouble(); return *this;
    }
	fast_reader& operator>>(float& n) {
        n = (float) readDouble(); return *this;
    }
    fast_reader& operator>>(string& s) {
        readWord(s); return *this;
    }
    fast_reader& operator>>(char& c) {
        c = (char) readChar(); return *this;
    }
    template<typename T>
    fast_reader& operator>>(vector<T>& a) {
        for (T& i : a) {
            (*this) >> i;
        }
        return *this;
    }
} f_reader;

struct fast_writer {
    template<typename T>
    fast_writer& operator<<(T n) {
        writeInt(n); return *this;
    }
	fast_writer& operator<<(double n) {
		writeDouble(n); return *this;
	}
	fast_writer& operator<<(float n) {
		writeDouble(n); return *this;
	}
    fast_writer& operator<<(const string& s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(const char* s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(char c) {
        writeChar(c); return *this;
    }
    template<typename T>
    fast_writer& operator<<(const vector<T>& a) {
        for (size_t i = 0; i < a.size(); ++i) {
            if (i) {
                (*this) << ' ';
            }
            (*this) << a[i];
        }
        return *this;
    }
    void flush() {
        ::flush();
    }
} f_writer;

#define cin f_reader
#define cout f_writer

#pragma GCC diagnostic pop
#endif //_LIB_FASTIO_

int main(int argc, char** argv) {
#ifdef VSE
    if (argc > 1) assert(freopen(argv[1], "r", stdin));
    rng.seed(0);
#endif
#ifndef cin
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#endif

    struct point {
        llong x, y;

        point operator+(point p) {
            return point{x + p.x, y + p.y};
        }
    };

    point s, t;
    cin >> s.x >> s.y >> t.x >> t.y;

    int n;
    string a;
    cin >> n >> a;

    auto move = [](point& p, char c) {
        if (c == 'U') {
            p.y++;
        } else if (c == 'D') {
            p.y--;
        } else if (c == 'L') {
            p.x--;
        } else {
            p.x++;
        }
    };

    point o = {0, 0};

    for (int i = 0; i < n; i++) {
        move(o, a[i]);
    }

    auto dist = [](point a, point b) {
        return abs(a.x - b.x) + abs(a.y - b.y);
    };

    llong ans = 0;
    point c = s;

    if (dist(s + o, t) > n) {
        llong d1 = dist(s, t);
        llong d2 = dist(s + o, t) - n;
        if (d1 == d2) {
            cout << -1;
            return 0;
        }

        llong x = max(0LL, d1 / (d1 - d2) - 1);

        ans = x * n;
        c = {s.x + o.x * x, s.y + o.y * x};
    }

    int i = 0;

    while (dist(c, t) > ans) {
        move(c, a[ans % n]);
        ans++;
        i++;
        assert(i <= 3 * n);
    }

    cout << ans << "\n";

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
using llong = long long;
auto isz = [](const auto& c) { return int(c.size()); };
mt19937 rng((size_t) make_shared<char>().get());

#ifndef _LIB_FASTIO_
#define _LIB_FASTIO_

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"

/** Fast allocation */

#ifdef FAST_ALLOCATOR_MEMORY
	int allocator_pos = 0;
	char allocator_memory[(int)FAST_ALLOCATOR_MEMORY];
	inline void * operator new ( size_t n ) {
		char *res = allocator_memory + allocator_pos;
		allocator_pos += n;
		assert(allocator_pos <= (int)FAST_ALLOCATOR_MEMORY);
		return (void *)res;
	}
	inline void operator delete ( void * ) noexcept { }
	//inline void * operator new [] ( size_t ) { assert(0); }
	//inline void operator delete [] ( void * ) { assert(0); }
#endif

/** Fast input-output */

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
	if (buf_pos == buf_len) {
		buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
		if (buf_pos == buf_len)
			return 1;
	}
	return 0;
}

inline int getChar() {
	return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
	return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
	int c;
	while ((c = peekChar()) != -1 && c <= 32)
		buf_pos++;
	return c == -1;
}

inline void skipBlanks() {
	while (!isEof() && buf[buf_pos] <= 32U)
		buf_pos++;
}

inline int readChar() {
	int c = getChar();
	while (c != -1 && c <= 32)
		c = getChar();
	return c;
}

inline unsigned int readUInt() {
	int c = readChar();
	unsigned int x = 0;
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return x;
}

template <class T = int>
inline T readInt() {
	int s = 1, c = readChar();
	T x = 0;
	if (c == '-')
		s = -1, c = getChar();
	else if (c == '+')
		c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return s == 1 ? x : -x;
}

inline long long readLong() {
	return readInt<long long>();
}

inline double readDouble() {
	int s = 1, c = readChar();
	double x = 0;
	if (c == '-')
		s = -1, c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	if (c == '.') {
		c = getChar();
		double coef = 1;
		while ('0' <= c && c <= '9')
			x += (c - '0') * (coef *= 1e-1), c = getChar();
	}
	return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
	int c = readChar();
	while (c > 32)
		*s++ = c, c = getChar();
	*s = 0;
}

inline void readWord( string &s ) {
	s.clear();
	int c = readChar();
	while (c > 32)
		s += c, c = getChar();
}

inline bool readLine( char *s ) {
	int c = getChar();
	while (c != '\n' && c != -1)
		*s++ = c, c = getChar();
	*s = 0;
	return c != -1;
}

inline bool readLine( string &s ) {
	s.clear();
	int c = getChar();
	while (c != '\n' && c != -1)
		s += c, c = getChar();
	return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
	if (write_buf_pos == buf_size)
		fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
	write_buf[write_buf_pos++] = x;
}

inline void flush() {
	if (write_buf_pos) {
		fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
		fflush(stdout);
	}
}

template <class T>
inline void writeInt( T x, char end = 0, int output_len = -1) {
	if (x < 0)
		writeChar('-'), x = -x;

	char s[24];
	int n = 0;
	while (x || !n)
		s[n++] = '0' + x % 10, x /= 10;
	while (n < output_len)
		s[n++] = '0';
	while (n--)
		writeChar(s[n]);
	if (end)
		writeChar(end);
}

inline void writeWord( const char *s ) {
	while (*s)
		writeChar(*s++);
}

inline void writeWord(const string& s) {
	writeWord(s.c_str());
}

inline void writeDouble( double x, int output_len = 0) {
	if (x < 0)
		writeChar('-'), x = -x;
	int t = (int)x;
	writeInt(t), x -= t;
	writeChar('.');
	for (int i = output_len - 1; i > 0; i--) {
		x *= 10;
		t = std::min(9, (int)x);
		writeChar('0' + t), x -= t;
	}
	x *= 10;
	t = std::min(9, (int)(x + 0.5));
	writeChar('0' + t);
}

/** Buffer flusher */

static struct buffer_flusher_t {
	~buffer_flusher_t() {
		flush();
	}
} buffer_flusher;

/** Reader and writer */

struct fast_reader {
    fast_reader& operator>>(int& n) {
        n = readInt(); return *this;
    }
    fast_reader& operator>>(unsigned int& n) {
        n = readUInt(); return *this;
    }
    fast_reader& operator>>(llong& n) {
        n = readLong(); return *this;
    }
	fast_reader& operator>>(double& n) {
        n = readDouble(); return *this;
    }
	fast_reader& operator>>(float& n) {
        n = (float) readDouble(); return *this;
    }
    fast_reader& operator>>(string& s) {
        readWord(s); return *this;
    }
    fast_reader& operator>>(char& c) {
        c = (char) readChar(); return *this;
    }
    template<typename T>
    fast_reader& operator>>(vector<T>& a) {
        for (T& i : a) {
            (*this) >> i;
        }
        return *this;
    }
} f_reader;

struct fast_writer {
    template<typename T>
    fast_writer& operator<<(T n) {
        writeInt(n); return *this;
    }
	fast_writer& operator<<(double n) {
		writeDouble(n); return *this;
	}
	fast_writer& operator<<(float n) {
		writeDouble(n); return *this;
	}
    fast_writer& operator<<(const string& s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(const char* s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(char c) {
        writeChar(c); return *this;
    }
    template<typename T>
    fast_writer& operator<<(const vector<T>& a) {
        for (size_t i = 0; i < a.size(); ++i) {
            if (i) {
                (*this) << ' ';
            }
            (*this) << a[i];
        }
        return *this;
    }
    void flush() {
        ::flush();
    }
} f_writer;

#define cin f_reader
#define cout f_writer

#pragma GCC diagnostic pop
#endif //_LIB_FASTIO_

int main(int argc, char** argv) {
#ifdef VSE
    if (argc > 1) assert(freopen(argv[1], "r", stdin));
    rng.seed(0);
#endif
#ifndef cin
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#endif

    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    int n;
    string s;
    cin >> n >> s;
    int d = abs(x1 - x2) + abs(y1 - y2);
    int ox1 = x1;
    int oy1 = y1;
    for (int i = 0; i < n; i++) {
        if (s[i] == 'U') {
            y1++;
        } else if (s[i] == 'D') {
            y1--;
        } else if (s[i] == 'L') {
            x1--;
        } else if (s[i] == 'R') {
            x1++;
        }
    }

    int cd = abs(x1 - x2) + abs(y1 - y2);
    cd = max(0, cd - n);

    if (cd == d) {
        cout << -1;
        return 0;
    }

    int x = max(0, d / (d - cd) - 1);

    llong ans = 1LL * x * n;

    llong nx1 = ox1 + 1LL * (x1 - ox1) * x;
    llong ny1 = oy1 + 1LL * (y1 - oy1) * x;

    llong i = 1LL * x * n;
    while (nx1 != x2 || ny1 != y2) {
        char c = s[i % n];
        if (c == 'U') {
            ny1++;
        } else if (c == 'D') {
            ny1--;
        } else if (c == 'L') {
            nx1--;
        } else if (c == 'R') {
            nx1++;
        }
        ans++;
        i++;
        llong dd = abs(nx1 - x2) + abs(ny1 - y2);
        if (dd <= i) {
            break;
        }
    }

    cout << ans << "\n";

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
using llong = long long;
auto isz = [](const auto& c) { return int(c.size()); };
mt19937 rng((size_t) make_shared<char>().get());

#ifndef _LIB_FASTIO_
#define _LIB_FASTIO_

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"

/** Fast allocation */

#ifdef FAST_ALLOCATOR_MEMORY
	int allocator_pos = 0;
	char allocator_memory[(int)FAST_ALLOCATOR_MEMORY];
	inline void * operator new ( size_t n ) {
		char *res = allocator_memory + allocator_pos;
		allocator_pos += n;
		assert(allocator_pos <= (int)FAST_ALLOCATOR_MEMORY);
		return (void *)res;
	}
	inline void operator delete ( void * ) noexcept { }
	//inline void * operator new [] ( size_t ) { assert(0); }
	//inline void operator delete [] ( void * ) { assert(0); }
#endif

/** Fast input-output */

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
	if (buf_pos == buf_len) {
		buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
		if (buf_pos == buf_len)
			return 1;
	}
	return 0;
}

inline int getChar() {
	return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
	return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
	int c;
	while ((c = peekChar()) != -1 && c <= 32)
		buf_pos++;
	return c == -1;
}

inline void skipBlanks() {
	while (!isEof() && buf[buf_pos] <= 32U)
		buf_pos++;
}

inline int readChar() {
	int c = getChar();
	while (c != -1 && c <= 32)
		c = getChar();
	return c;
}

inline unsigned int readUInt() {
	int c = readChar();
	unsigned int x = 0;
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return x;
}

template <class T = int>
inline T readInt() {
	int s = 1, c = readChar();
	T x = 0;
	if (c == '-')
		s = -1, c = getChar();
	else if (c == '+')
		c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return s == 1 ? x : -x;
}

inline long long readLong() {
	return readInt<long long>();
}

inline double readDouble() {
	int s = 1, c = readChar();
	double x = 0;
	if (c == '-')
		s = -1, c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	if (c == '.') {
		c = getChar();
		double coef = 1;
		while ('0' <= c && c <= '9')
			x += (c - '0') * (coef *= 1e-1), c = getChar();
	}
	return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
	int c = readChar();
	while (c > 32)
		*s++ = c, c = getChar();
	*s = 0;
}

inline void readWord( string &s ) {
	s.clear();
	int c = readChar();
	while (c > 32)
		s += c, c = getChar();
}

inline bool readLine( char *s ) {
	int c = getChar();
	while (c != '\n' && c != -1)
		*s++ = c, c = getChar();
	*s = 0;
	return c != -1;
}

inline bool readLine( string &s ) {
	s.clear();
	int c = getChar();
	while (c != '\n' && c != -1)
		s += c, c = getChar();
	return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
	if (write_buf_pos == buf_size)
		fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
	write_buf[write_buf_pos++] = x;
}

inline void flush() {
	if (write_buf_pos) {
		fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
		fflush(stdout);
	}
}

template <class T>
inline void writeInt( T x, char end = 0, int output_len = -1) {
	if (x < 0)
		writeChar('-'), x = -x;

	char s[24];
	int n = 0;
	while (x || !n)
		s[n++] = '0' + x % 10, x /= 10;
	while (n < output_len)
		s[n++] = '0';
	while (n--)
		writeChar(s[n]);
	if (end)
		writeChar(end);
}

inline void writeWord( const char *s ) {
	while (*s)
		writeChar(*s++);
}

inline void writeWord(const string& s) {
	writeWord(s.c_str());
}

inline void writeDouble( double x, int output_len = 0) {
	if (x < 0)
		writeChar('-'), x = -x;
	int t = (int)x;
	writeInt(t), x -= t;
	writeChar('.');
	for (int i = output_len - 1; i > 0; i--) {
		x *= 10;
		t = std::min(9, (int)x);
		writeChar('0' + t), x -= t;
	}
	x *= 10;
	t = std::min(9, (int)(x + 0.5));
	writeChar('0' + t);
}

/** Buffer flusher */

static struct buffer_flusher_t {
	~buffer_flusher_t() {
		flush();
	}
} buffer_flusher;

/** Reader and writer */

struct fast_reader {
    fast_reader& operator>>(int& n) {
        n = readInt(); return *this;
    }
    fast_reader& operator>>(unsigned int& n) {
        n = readUInt(); return *this;
    }
    fast_reader& operator>>(llong& n) {
        n = readLong(); return *this;
    }
	fast_reader& operator>>(double& n) {
        n = readDouble(); return *this;
    }
	fast_reader& operator>>(float& n) {
        n = (float) readDouble(); return *this;
    }
    fast_reader& operator>>(string& s) {
        readWord(s); return *this;
    }
    fast_reader& operator>>(char& c) {
        c = (char) readChar(); return *this;
    }
    template<typename T>
    fast_reader& operator>>(vector<T>& a) {
        for (T& i : a) {
            (*this) >> i;
        }
        return *this;
    }
} f_reader;

struct fast_writer {
    template<typename T>
    fast_writer& operator<<(T n) {
        writeInt(n); return *this;
    }
	fast_writer& operator<<(double n) {
		writeDouble(n); return *this;
	}
	fast_writer& operator<<(float n) {
		writeDouble(n); return *this;
	}
    fast_writer& operator<<(const string& s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(const char* s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(char c) {
        writeChar(c); return *this;
    }
    template<typename T>
    fast_writer& operator<<(const vector<T>& a) {
        for (size_t i = 0; i < a.size(); ++i) {
            if (i) {
                (*this) << ' ';
            }
            (*this) << a[i];
        }
        return *this;
    }
    void flush() {
        ::flush();
    }
} f_writer;

#define cin f_reader
#define cout f_writer

#pragma GCC diagnostic pop
#endif //_LIB_FASTIO_

int main(int argc, char** argv) {
#ifdef VSE
    if (argc > 1) assert(freopen(argv[1], "r", stdin));
    rng.seed(0);
#endif
#ifndef cin
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#endif

    struct point {
        llong x, y;

        point operator+(point p) {
            return point{x + p.x, y + p.y};
        }

        point operator*(llong k) {
            return point{x * k, y * k};
        }
    };

    point s, t;
    cin >> s.x >> s.y >> t.x >> t.y;

    int n;
    string a;
    cin >> n >> a;

    auto move = [](point& p, char c) {
        if (c == 'U') {
            p.y++;
        } else if (c == 'D') {
            p.y--;
        } else if (c == 'L') {
            p.x--;
        } else {
            p.x++;
        }
    };

    point o = {0, 0};
    vector<point> os(n);

    for (int i = 0; i < n; i++) {
        move(o, a[i]);
        os[i] = o;
    }

    auto dist = [](point a, point b) {
        return abs(a.x - b.x) + abs(a.y - b.y);
    };

    llong l = 0, r = 1e15;

    while (l + 1 < r) {
        llong m = (l + r) >> 1;

        llong x = m / n;
        o = {0, 0};
        o = o + os[n - 1] * x;
        if (m % n) {
            o = o + os[m % n - 1];
        }
        o = s + o;
        if (dist(o, t) <= m) {
            r = m;
        } else {
            l = m;
        }
    }

    if (r == (llong) 1e15) {
        cout << -1;
    } else {
        cout << r;
    }

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
using llong = long long;
auto isz = [](const auto& c) { return int(c.size()); };
mt19937 rng((size_t) make_shared<char>().get());

#ifndef _LIB_FASTIO_
#define _LIB_FASTIO_

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"

/** Fast allocation */

#ifdef FAST_ALLOCATOR_MEMORY
	int allocator_pos = 0;
	char allocator_memory[(int)FAST_ALLOCATOR_MEMORY];
	inline void * operator new ( size_t n ) {
		char *res = allocator_memory + allocator_pos;
		allocator_pos += n;
		assert(allocator_pos <= (int)FAST_ALLOCATOR_MEMORY);
		return (void *)res;
	}
	inline void operator delete ( void * ) noexcept { }
	//inline void * operator new [] ( size_t ) { assert(0); }
	//inline void operator delete [] ( void * ) { assert(0); }
#endif

/** Fast input-output */

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
	if (buf_pos == buf_len) {
		buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
		if (buf_pos == buf_len)
			return 1;
	}
	return 0;
}

inline int getChar() {
	return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
	return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
	int c;
	while ((c = peekChar()) != -1 && c <= 32)
		buf_pos++;
	return c == -1;
}

inline void skipBlanks() {
	while (!isEof() && buf[buf_pos] <= 32U)
		buf_pos++;
}

inline int readChar() {
	int c = getChar();
	while (c != -1 && c <= 32)
		c = getChar();
	return c;
}

inline unsigned int readUInt() {
	int c = readChar();
	unsigned int x = 0;
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return x;
}

template <class T = int>
inline T readInt() {
	int s = 1, c = readChar();
	T x = 0;
	if (c == '-')
		s = -1, c = getChar();
	else if (c == '+')
		c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return s == 1 ? x : -x;
}

inline long long readLong() {
	return readInt<long long>();
}

inline double readDouble() {
	int s = 1, c = readChar();
	double x = 0;
	if (c == '-')
		s = -1, c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	if (c == '.') {
		c = getChar();
		double coef = 1;
		while ('0' <= c && c <= '9')
			x += (c - '0') * (coef *= 1e-1), c = getChar();
	}
	return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
	int c = readChar();
	while (c > 32)
		*s++ = c, c = getChar();
	*s = 0;
}

inline void readWord( string &s ) {
	s.clear();
	int c = readChar();
	while (c > 32)
		s += c, c = getChar();
}

inline bool readLine( char *s ) {
	int c = getChar();
	while (c != '\n' && c != -1)
		*s++ = c, c = getChar();
	*s = 0;
	return c != -1;
}

inline bool readLine( string &s ) {
	s.clear();
	int c = getChar();
	while (c != '\n' && c != -1)
		s += c, c = getChar();
	return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
	if (write_buf_pos == buf_size)
		fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
	write_buf[write_buf_pos++] = x;
}

inline void flush() {
	if (write_buf_pos) {
		fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
		fflush(stdout);
	}
}

template <class T>
inline void writeInt( T x, char end = 0, int output_len = -1) {
	if (x < 0)
		writeChar('-'), x = -x;

	char s[24];
	int n = 0;
	while (x || !n)
		s[n++] = '0' + x % 10, x /= 10;
	while (n < output_len)
		s[n++] = '0';
	while (n--)
		writeChar(s[n]);
	if (end)
		writeChar(end);
}

inline void writeWord( const char *s ) {
	while (*s)
		writeChar(*s++);
}

inline void writeWord(const string& s) {
	writeWord(s.c_str());
}

inline void writeDouble( double x, int output_len = 0) {
	if (x < 0)
		writeChar('-'), x = -x;
	int t = (int)x;
	writeInt(t), x -= t;
	writeChar('.');
	for (int i = output_len - 1; i > 0; i--) {
		x *= 10;
		t = std::min(9, (int)x);
		writeChar('0' + t), x -= t;
	}
	x *= 10;
	t = std::min(9, (int)(x + 0.5));
	writeChar('0' + t);
}

/** Buffer flusher */

static struct buffer_flusher_t {
	~buffer_flusher_t() {
		flush();
	}
} buffer_flusher;

/** Reader and writer */

struct fast_reader {
    fast_reader& operator>>(int& n) {
        n = readInt(); return *this;
    }
    fast_reader& operator>>(unsigned int& n) {
        n = readUInt(); return *this;
    }
    fast_reader& operator>>(llong& n) {
        n = readLong(); return *this;
    }
	fast_reader& operator>>(double& n) {
        n = readDouble(); return *this;
    }
	fast_reader& operator>>(float& n) {
        n = (float) readDouble(); return *this;
    }
    fast_reader& operator>>(string& s) {
        readWord(s); return *this;
    }
    fast_reader& operator>>(char& c) {
        c = (char) readChar(); return *this;
    }
    template<typename T>
    fast_reader& operator>>(vector<T>& a) {
        for (T& i : a) {
            (*this) >> i;
        }
        return *this;
    }
} f_reader;

struct fast_writer {
    template<typename T>
    fast_writer& operator<<(T n) {
        writeInt(n); return *this;
    }
	fast_writer& operator<<(double n) {
		writeDouble(n); return *this;
	}
	fast_writer& operator<<(float n) {
		writeDouble(n); return *this;
	}
    fast_writer& operator<<(const string& s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(const char* s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(char c) {
        writeChar(c); return *this;
    }
    template<typename T>
    fast_writer& operator<<(const vector<T>& a) {
        for (size_t i = 0; i < a.size(); ++i) {
            if (i) {
                (*this) << ' ';
            }
            (*this) << a[i];
        }
        return *this;
    }
    void flush() {
        ::flush();
    }
} f_writer;

#define cin f_reader
#define cout f_writer

#pragma GCC diagnostic pop
#endif //_LIB_FASTIO_

int main(int argc, char** argv) {
#ifdef VSE
    if (argc > 1) assert(freopen(argv[1], "r", stdin));
    rng.seed(0);
#endif
#ifndef cin
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#endif

    struct point {
        llong x, y;

        point operator+(point p) {
            return point{x + p.x, y + p.y};
        }
    };

    point s, t;
    cin >> s.x >> s.y >> t.x >> t.y;

    int n;
    string a;
    cin >> n >> a;

    auto move = [](point& p, char c) {
        if (c == 'U') {
            p.y++;
        } else if (c == 'D') {
            p.y--;
        } else if (c == 'L') {
            p.x--;
        } else {
            p.x++;
        }
    };

    point o = {0, 0};

    for (int i = 0; i < n; i++) {
        move(o, a[i]);
    }

    auto dist = [](point a, point b) {
        return abs(a.x - b.x) + abs(a.y - b.y);
    };

    llong ans = 0;
    point c = s;

    if (dist(s + o, t) > n) {
        llong d1 = dist(s, t);
        llong d2 = dist(s + o, t) - n;
        if (d1 == d2) {
            cout << -1;
            return 0;
        }

        llong x = max(0LL, d1 / (d1 - d2) - 1);

        ans = x * n;
        c = {s.x + o.x * x, s.y + o.y * x};
    }

    while (dist(c, t) > ans) {
        move(c, a[ans % n]);
        ans++;
    }

    cout << ans << "\n";

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
using llong = long long;
auto isz = [](const auto& c) { return int(c.size()); };
mt19937 rng((size_t) make_shared<char>().get());

#ifndef _LIB_FASTIO_
#define _LIB_FASTIO_

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"

/** Fast allocation */

#ifdef FAST_ALLOCATOR_MEMORY
	int allocator_pos = 0;
	char allocator_memory[(int)FAST_ALLOCATOR_MEMORY];
	inline void * operator new ( size_t n ) {
		char *res = allocator_memory + allocator_pos;
		allocator_pos += n;
		assert(allocator_pos <= (int)FAST_ALLOCATOR_MEMORY);
		return (void *)res;
	}
	inline void operator delete ( void * ) noexcept { }
	//inline void * operator new [] ( size_t ) { assert(0); }
	//inline void operator delete [] ( void * ) { assert(0); }
#endif

/** Fast input-output */

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
	if (buf_pos == buf_len) {
		buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
		if (buf_pos == buf_len)
			return 1;
	}
	return 0;
}

inline int getChar() {
	return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
	return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
	int c;
	while ((c = peekChar()) != -1 && c <= 32)
		buf_pos++;
	return c == -1;
}

inline void skipBlanks() {
	while (!isEof() && buf[buf_pos] <= 32U)
		buf_pos++;
}

inline int readChar() {
	int c = getChar();
	while (c != -1 && c <= 32)
		c = getChar();
	return c;
}

inline unsigned int readUInt() {
	int c = readChar();
	unsigned int x = 0;
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return x;
}

template <class T = int>
inline T readInt() {
	int s = 1, c = readChar();
	T x = 0;
	if (c == '-')
		s = -1, c = getChar();
	else if (c == '+')
		c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return s == 1 ? x : -x;
}

inline long long readLong() {
	return readInt<long long>();
}

inline double readDouble() {
	int s = 1, c = readChar();
	double x = 0;
	if (c == '-')
		s = -1, c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	if (c == '.') {
		c = getChar();
		double coef = 1;
		while ('0' <= c && c <= '9')
			x += (c - '0') * (coef *= 1e-1), c = getChar();
	}
	return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
	int c = readChar();
	while (c > 32)
		*s++ = c, c = getChar();
	*s = 0;
}

inline void readWord( string &s ) {
	s.clear();
	int c = readChar();
	while (c > 32)
		s += c, c = getChar();
}

inline bool readLine( char *s ) {
	int c = getChar();
	while (c != '\n' && c != -1)
		*s++ = c, c = getChar();
	*s = 0;
	return c != -1;
}

inline bool readLine( string &s ) {
	s.clear();
	int c = getChar();
	while (c != '\n' && c != -1)
		s += c, c = getChar();
	return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
	if (write_buf_pos == buf_size)
		fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
	write_buf[write_buf_pos++] = x;
}

inline void flush() {
	if (write_buf_pos) {
		fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
		fflush(stdout);
	}
}

template <class T>
inline void writeInt( T x, char end = 0, int output_len = -1) {
	if (x < 0)
		writeChar('-'), x = -x;

	char s[24];
	int n = 0;
	while (x || !n)
		s[n++] = '0' + x % 10, x /= 10;
	while (n < output_len)
		s[n++] = '0';
	while (n--)
		writeChar(s[n]);
	if (end)
		writeChar(end);
}

inline void writeWord( const char *s ) {
	while (*s)
		writeChar(*s++);
}

inline void writeWord(const string& s) {
	writeWord(s.c_str());
}

inline void writeDouble( double x, int output_len = 0) {
	if (x < 0)
		writeChar('-'), x = -x;
	int t = (int)x;
	writeInt(t), x -= t;
	writeChar('.');
	for (int i = output_len - 1; i > 0; i--) {
		x *= 10;
		t = std::min(9, (int)x);
		writeChar('0' + t), x -= t;
	}
	x *= 10;
	t = std::min(9, (int)(x + 0.5));
	writeChar('0' + t);
}

/** Buffer flusher */

static struct buffer_flusher_t {
	~buffer_flusher_t() {
		flush();
	}
} buffer_flusher;

/** Reader and writer */

struct fast_reader {
    fast_reader& operator>>(int& n) {
        n = readInt(); return *this;
    }
    fast_reader& operator>>(unsigned int& n) {
        n = readUInt(); return *this;
    }
    fast_reader& operator>>(llong& n) {
        n = readLong(); return *this;
    }
	fast_reader& operator>>(double& n) {
        n = readDouble(); return *this;
    }
	fast_reader& operator>>(float& n) {
        n = (float) readDouble(); return *this;
    }
    fast_reader& operator>>(string& s) {
        readWord(s); return *this;
    }
    fast_reader& operator>>(char& c) {
        c = (char) readChar(); return *this;
    }
    template<typename T>
    fast_reader& operator>>(vector<T>& a) {
        for (T& i : a) {
            (*this) >> i;
        }
        return *this;
    }
} f_reader;

struct fast_writer {
    template<typename T>
    fast_writer& operator<<(T n) {
        writeInt(n); return *this;
    }
	fast_writer& operator<<(double n) {
		writeDouble(n); return *this;
	}
	fast_writer& operator<<(float n) {
		writeDouble(n); return *this;
	}
    fast_writer& operator<<(const string& s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(const char* s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(char c) {
        writeChar(c); return *this;
    }
    template<typename T>
    fast_writer& operator<<(const vector<T>& a) {
        for (size_t i = 0; i < a.size(); ++i) {
            if (i) {
                (*this) << ' ';
            }
            (*this) << a[i];
        }
        return *this;
    }
    void flush() {
        ::flush();
    }
} f_writer;

#define cin f_reader
#define cout f_writer

#pragma GCC diagnostic pop
#endif //_LIB_FASTIO_

int main(int argc, char** argv) {
#ifdef VSE
    if (argc > 1) assert(freopen(argv[1], "r", stdin));
    rng.seed(0);
#endif
#ifndef cin
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#endif

    struct point {
        llong x, y;

        point operator+(point p) {
            return point{x + p.x, y + p.y};
        }
    };

    point s, t;
    cin >> s.x >> s.y >> t.x >> t.y;

    int n;
    string a;
    cin >> n >> a;

    auto move = [](point& p, char c) {
        if (c == 'U') {
            p.y++;
        } else if (c == 'D') {
            p.y--;
        } else if (c == 'L') {
            p.x--;
        } else {
            p.x++;
        }
    };

    point o = {0, 0};

    for (int i = 0; i < n; i++) {
        move(o, a[i]);
    }

    auto dist = [](point a, point b) {
        return abs(a.x - b.x) + abs(a.y - b.y);
    };

    llong ans = 0;
    point c = s;

    if (dist(s + o, t) > n) {
        llong d1 = dist(s, t);
        llong d2 = dist(s + o, t) - n;
        if (d1 == d2) {
            cout << -1;
            return 0;
        }

        llong x = max(0LL, d1 / (d1 - d2) - 1);

        ans = x * n;
        c = {s.x + o.x * x, s.y + o.y * x};
    }

    int i = 0;

    while (dist(c, t) > ans) {
        move(c, a[ans % n]);
        ans++;
        i++;
        if (i > 3 * n) {
            cout << -1;
            return 0;
            // cout << s.x << " " << s.y << "\n";
            // cout << t.x << " " << t.y << "\n";
            // cout << o.x << " " << o.y << "\n";
            // cout << c.x << " " << c.y << "\n";
            // cout << ans << "\n";
            // return 0;
        }
    }

    cout << ans << "\n";

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;

template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
using llong = long long;
auto isz = [](const auto& c) { return int(c.size()); };
mt19937 rng((size_t) make_shared<char>().get());

#ifndef _LIB_FASTIO_
#define _LIB_FASTIO_

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"

/** Fast allocation */

#ifdef FAST_ALLOCATOR_MEMORY
	int allocator_pos = 0;
	char allocator_memory[(int)FAST_ALLOCATOR_MEMORY];
	inline void * operator new ( size_t n ) {
		char *res = allocator_memory + allocator_pos;
		allocator_pos += n;
		assert(allocator_pos <= (int)FAST_ALLOCATOR_MEMORY);
		return (void *)res;
	}
	inline void operator delete ( void * ) noexcept { }
	//inline void * operator new [] ( size_t ) { assert(0); }
	//inline void operator delete [] ( void * ) { assert(0); }
#endif

/** Fast input-output */

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
	if (buf_pos == buf_len) {
		buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
		if (buf_pos == buf_len)
			return 1;
	}
	return 0;
}

inline int getChar() {
	return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
	return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
	int c;
	while ((c = peekChar()) != -1 && c <= 32)
		buf_pos++;
	return c == -1;
}

inline void skipBlanks() {
	while (!isEof() && buf[buf_pos] <= 32U)
		buf_pos++;
}

inline int readChar() {
	int c = getChar();
	while (c != -1 && c <= 32)
		c = getChar();
	return c;
}

inline unsigned int readUInt() {
	int c = readChar();
	unsigned int x = 0;
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return x;
}

template <class T = int>
inline T readInt() {
	int s = 1, c = readChar();
	T x = 0;
	if (c == '-')
		s = -1, c = getChar();
	else if (c == '+')
		c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	return s == 1 ? x : -x;
}

inline long long readLong() {
	return readInt<long long>();
}

inline double readDouble() {
	int s = 1, c = readChar();
	double x = 0;
	if (c == '-')
		s = -1, c = getChar();
	while ('0' <= c && c <= '9')
		x = x * 10 + c - '0', c = getChar();
	if (c == '.') {
		c = getChar();
		double coef = 1;
		while ('0' <= c && c <= '9')
			x += (c - '0') * (coef *= 1e-1), c = getChar();
	}
	return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
	int c = readChar();
	while (c > 32)
		*s++ = c, c = getChar();
	*s = 0;
}

inline void readWord( string &s ) {
	s.clear();
	int c = readChar();
	while (c > 32)
		s += c, c = getChar();
}

inline bool readLine( char *s ) {
	int c = getChar();
	while (c != '\n' && c != -1)
		*s++ = c, c = getChar();
	*s = 0;
	return c != -1;
}

inline bool readLine( string &s ) {
	s.clear();
	int c = getChar();
	while (c != '\n' && c != -1)
		s += c, c = getChar();
	return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
	if (write_buf_pos == buf_size)
		fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
	write_buf[write_buf_pos++] = x;
}

inline void flush() {
	if (write_buf_pos) {
		fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
		fflush(stdout);
	}
}

template <class T>
inline void writeInt( T x, char end = 0, int output_len = -1) {
	if (x < 0)
		writeChar('-'), x = -x;

	char s[24];
	int n = 0;
	while (x || !n)
		s[n++] = '0' + x % 10, x /= 10;
	while (n < output_len)
		s[n++] = '0';
	while (n--)
		writeChar(s[n]);
	if (end)
		writeChar(end);
}

inline void writeWord( const char *s ) {
	while (*s)
		writeChar(*s++);
}

inline void writeWord(const string& s) {
	writeWord(s.c_str());
}

inline void writeDouble( double x, int output_len = 0) {
	if (x < 0)
		writeChar('-'), x = -x;
	int t = (int)x;
	writeInt(t), x -= t;
	writeChar('.');
	for (int i = output_len - 1; i > 0; i--) {
		x *= 10;
		t = std::min(9, (int)x);
		writeChar('0' + t), x -= t;
	}
	x *= 10;
	t = std::min(9, (int)(x + 0.5));
	writeChar('0' + t);
}

/** Buffer flusher */

static struct buffer_flusher_t {
	~buffer_flusher_t() {
		flush();
	}
} buffer_flusher;

/** Reader and writer */

struct fast_reader {
    fast_reader& operator>>(int& n) {
        n = readInt(); return *this;
    }
    fast_reader& operator>>(unsigned int& n) {
        n = readUInt(); return *this;
    }
    fast_reader& operator>>(llong& n) {
        n = readLong(); return *this;
    }
	fast_reader& operator>>(double& n) {
        n = readDouble(); return *this;
    }
	fast_reader& operator>>(float& n) {
        n = (float) readDouble(); return *this;
    }
    fast_reader& operator>>(string& s) {
        readWord(s); return *this;
    }
    fast_reader& operator>>(char& c) {
        c = (char) readChar(); return *this;
    }
    template<typename T>
    fast_reader& operator>>(vector<T>& a) {
        for (T& i : a) {
            (*this) >> i;
        }
        return *this;
    }
} f_reader;

struct fast_writer {
    template<typename T>
    fast_writer& operator<<(T n) {
        writeInt(n); return *this;
    }
	fast_writer& operator<<(double n) {
		writeDouble(n); return *this;
	}
	fast_writer& operator<<(float n) {
		writeDouble(n); return *this;
	}
    fast_writer& operator<<(const string& s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(const char* s) {
        writeWord(s); return *this;
    }
    fast_writer& operator<<(char c) {
        writeChar(c); return *this;
    }
    template<typename T>
    fast_writer& operator<<(const vector<T>& a) {
        for (size_t i = 0; i < a.size(); ++i) {
            if (i) {
                (*this) << ' ';
            }
            (*this) << a[i];
        }
        return *this;
    }
    void flush() {
        ::flush();
    }
} f_writer;

#define cin f_reader
#define cout f_writer

#pragma GCC diagnostic pop
#endif //_LIB_FASTIO_

int main(int argc, char** argv) {
#ifdef VSE
    if (argc > 1) assert(freopen(argv[1], "r", stdin));
    rng.seed(0);
#endif
#ifndef cin
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#endif

    struct point {
        llong x, y;

        point operator+(point p) {
            return point{x + p.x, y + p.y};
        }
    };

    point s, t;
    cin >> s.x >> s.y >> t.x >> t.y;

    int n;
    string a;
    cin >> n >> a;

    auto move = [](point& p, char c) {
        if (c == 'U') {
            p.y++;
        } else if (c == 'D') {
            p.y--;
        } else if (c == 'L') {
            p.x--;
        } else {
            p.x++;
        }
    };

    point o = {0, 0};

    for (int i = 0; i < n; i++) {
        move(o, a[i]);
    }

    auto dist = [](point a, point b) {
        return abs(a.x - b.x) + abs(a.y - b.y);
    };

    llong ans = 0;
    point c = s;

    if (dist(s + o, t) > n) {
        llong d1 = dist(s, t);
        llong d2 = dist(s + o, t) - n;
        if (d1 == d2) {
            cout << -1;
            return 0;
        }

        llong x = max(0LL, d1 / (d1 - d2) - 1);

        ans = x * n;
        c = {s.x + o.x * x, s.y + o.y * x};
    }

    int i = 0;

    while (dist(c, t) > ans) {
        move(c, a[ans % n]);
        ans++;
        i++;
        if (i > 3 * n) {
            cout << s.x << " " << s.y << "\n";
            cout << t.x << " " << t.y << "\n";
            cout << o.x << " " << o.y << "\n";
            cout << c.x << " " << c.y << "\n";
            cout << ans << "\n";
            return 0;
        }
    }

    cout << ans << "\n";

    return 0;
}