/***Bismillahhirrahmannirrahim***/
/***coding is fun if u enjoy it***/


#include<bits/stdc++.h>

using namespace std;


/*** Input-Output ***/

#define pf   printf

#define sfi(t)     scanf("%d",&t)
#define sfi2(a,b)  scanf("%d %d",&a,&b)
#define sfl(t)     scanf("%lld",&t)
#define sfl2(a,b)  scanf("%lld %lld",&a,&b)



/*** Typedef ***/

typedef unsigned long long ull;
typedef long long ll;



/*** Some Prints ***/

#define en cout << '\n'
#define NO cout << "NO" << '\n'
#define no cout << "no" << '\n'
#define YES cout << "YES" << '\n'
#define yes cout << "yes" << '\n'
#define case(t) cout << "Case " << t << ": "




/*** Grids ***/

int drx[8]={-2,-2,-1,-1,1,1,2,2};
int dry[8]={-1,1,-2,2,-2,2,-1,1};
int dirx[4]={-1,0,1,0};
int diry[4]={0,-1,0,1};



/*** Loops ***/

#define foR0(num) for(int i=0;i<num;i++)
#define foR1(num) for(int i=1;i<=num;i++)
#define foRev(num) for(int i=num-1;i>=0;i--)
#define forIn(arr,num) for(int i=0;i<num;i++) sfi(arr[i]);
#define forIn1(arr,num) for(int i=1;i<=num;i++) sfi(arr[i]);
#define vprt(ans) for(int i=0;i<ans.size();i++) cout<< ans[i] << (i+1<ans.size() ? ' ' : '\n');
#define aprt(arr,num) for(int i=0;i<num;i++) cout<< arr[i] << (i+1<ans.size() ? ' ' : '\n');


/*** Sorts ***/

#define all(v) (v).begin(),(v).end()
#define rev(v) reverse(all(v))
#define srt(v) sort(all(v))
#define srtG(v) sort(all(v),greater<int>())




/*** STLs ***/

typedef vector <ll> vll;
typedef vector <int> vi;
typedef set <ll> sll;
typedef set <int> si;
typedef multiset <ll> msll;
typedef multiset <int> msi;
typedef stack <int> sti;
typedef stack <ll> stll;
typedef queue <ll> qll;
typedef queue <int> qi;
typedef map <ll,ll> mll;
typedef map <int,int> mii;
typedef pair <ll,ll> pll;
typedef pair <int,int> pii;
typedef vector <pll> vpll;
typedef vector <pii> vpii;




/*** Define Values ***/

#define PI 2*acos(0.0)
#define E 2.718281828
#define mod 1000000007
#define eps 1e-7
#define sz 100010
#define mx 500009


#define pb     push_back
#define pob    pob_back
#define puf    push_front
#define pof    pop_front
#define F      first
#define S      second
#define mp     make_pair
#define ins    insert


#define mem(v,val) memset(v,val,sizeof v)
#define add(v)     accumulate(v.begin(),v.end(), 0)
#define debug(x)   cout<<#x<<" = "<<x<<endl;




void solve()
{

	string s;
    cin>>s;
    for(int i=1;i<s.size();i++)
        cout<<s[i];
    cout<<s[0]<<endl;

 	 
}
 


int main()
{

	
	solve();

	/*int tc,cs=0;
	sfi(tc);
	while(tc--){

		///case(++cs);
		solve();

	}*/

 	return 0;
}


#include "bits/stdc++.h"
using namespace std;
//#include "testlib.h"
#define ff first
#define ss second
#define all(v) v.begin(),v.end()
#define int long long
#define ll long long
#define M 1000000007
#define MM 998244353
#define inputarr(a,n) for(int i=0;i<n;++i) cin>>a[i]
#define GCD(m,n) __gcd(m,n)
#define LCM(m,n) m*(n/GCD(m,n))
#define mii  map<ll ,ll >
#define msi  map<string,ll >
#define rep(a,b)    for(ll i=a;i<b;i++)
#define rep0(n)    for(ll i=0;i<n;i++)
#define repi(i,a,b) for(ll i=a;i<b;i++)
#define pb push_back
#define vi vector<ll>
#define vs vector<string>
#define ppb pop_back
#define endl '\n'
#define asdf ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define r0 return 0;
#define FORD(i, a, b) for (int i = (int) (a); i >= (int) (b); --i)
#define inputoutput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define Set(a, s) (a, s, sizeof (a))
#define FOR repi
#define vii vector<pii>
#define pii pair<int,int>
#define REVERSE(v) reverse(all(v))
#define trav(a, x) for(auto& a : x)
#define display(x) trav(a,x) cout<<a<<" ";cout<<endl
#define debug cerr<<"bhau"<<endl
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
template<typename T, typename U> static inline void amin(T &x, U y) 
{ 
    if (y < x) 
        x = y; 
}
template<typename T, typename U> static inline void amax(T &x, U y) 
{ 
    if (x < y) 
        x = y; 
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};



ll max(ll a, ll b) { return (a > b)? a : b;}
int min(int a, int b) { return (a < b)? a : b;} 


int solve(){

    int n, k;
    cin >> n >> k;
    int ans = 0;
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= k; j++){
            ans += i * 100 + j;
        }
    }
    cout << ans;


    return 0;
}
signed main(){
    asdf
    // freopen("inputf.in", "w", stdout);
    
    int t=1;
    // cin>>t;
    while(t--){
        solve();
    }
    return 0;
}
