/*

    P_r_A_d_Y ☹

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

#define int     long long int
#define endl    "\n"
#define mod     1000000007
#define inf     1e18
#define pb      push_back
#define all(x)  x.begin(),x.end()
#define arr_max(x)  *max_element(x.begin(),x.end())
#define arr_min(x)  *min_element(x.begin(),x.end())
#define pii         pair<int,int>
#define ff          first
#define ss          second
#define vec         vector<int>

const int N = 300005;

#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);


bool cmp(vector<int>a , vector<int>b) {
    return a[0] < b[0];
}
int poww(int x, int n)
{
    if (n == 0 ) return 1 ;
    int u = poww(x, n / 2);
    u = (u * u) ;
    if (n % 2 == 1)u = (u * x) ;
    return u;
}

//(x**n)%m
int mod_pow(int x, int n, int m)
{
    if (n == 0 ) return 1 % m;
    int u = mod_pow(x, n / 2, m);
    u = (u * u) % m;
    if (n % 2 == 1)u = (u * x) % m;
    return u;
}
int query(int l, int r)
{
    int x;
    cout << "? " << l << " " << r << endl;
    cin >> x;

    return x;
}

// int xd[4] = {1, 0, -1, 0};
// int yd[4] = {0, -1, 0, 1};

int help(int n)
{
    int count_pairs = 0;

    for (int i = 1; i <= sqrt(n - 1); ++i) {
        for (int j = i; j * i < n; ++j)
            ++count_pairs;
    }

    count_pairs *= 2;

    count_pairs -= (int)(sqrt(n - 1));

    return count_pairs;
}

int32_t main()
{
    fastIO;

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


    int t;
    t = 1;
    //cin >> t;
    int ert = 1;
    while (t--)
    {
        int k; cin >> k;
        int ans = 0;
        for (int i = 1; i <= k; i++)
        {
            int r = k / i;

            if (r == 0)
                break;
            int g = help(r + 1);
            //cout << r << " " << g << endl;
            ans += g;

        }

        cout << ans << endl;

    }

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i, n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i, a, b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)


int main() {
    string S;
    cin >> S;

    bool is_reversed = false;
    deque<char> q;

    for(auto s: S) {
        if (s == 'R') is_reversed = !is_reversed;
        else {
            if (is_reversed) {
                // 反転されているときは先頭に追加する
                q.push_front(s);
            }
            else {
                // そうでないときは末尾に追加する
                q.push_back(s);
            }
        }
    }
    if (is_reversed) {
        reverse(q.begin(), q.end());
    }

    string T;
    for(char c : q) {
        if (T.size() && T.back() == c) T.pop_back();
        else T.push_back(c);
    }

    cout << T << endl;

    return 0;
}