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

typedef long long ll;

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
#define tt int t; cin>>t; while(t--)
#define nl cout<<"\n";
#define sp cout<<" ";
#define rep(i, a, b) for(long long i=a; i<b; i++)

const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
double PI = 4*atan(1);

int main()
{
    optimize();

    int a, b;

    cin >> a>> b;

    cout<< a*b;
    nl;
    return 0;
}



#include <iostream>
using namespace std;

int main(void){
  int cd=0;
  char c;
  
  for (int i=0; i<3; i++){
    cin >> c;
    cd = (cd<<1) | (c=='R'?1:0);
  }
  cout << (cd["01121123"]) << endl;
  return 0;
}