#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int f = 1, ans = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ans = ans * 10 + c - '0';
    c = getchar();
  }
  return f * ans;
}
const int MAXN = 400011;
char str[MAXN];
int len, a[MAXN], b[MAXN], ans;
int main() {
  scanf("%s", str + 1);
  len = strlen(str + 1);
  if (str[1] == 'S') printf("%d\n", 0);
  return 0;
}
