#include <iostream>
#include<string>
using namespace std;

int main() {
	string s="LLLCC";
	int L=0;
	int LC=0;
	for(int i=0;i<s.size();i++) {
		if(s[i]=='L') {
			L++;
		}
		if(s[i]=='C') {
			LC+=L;
		}
	}
	cout<<LC;
	return 0;
}