#include <bits/stdc++.h>
int main() {
  int n, j, i, flag = 0, c = 0;
  char a[100];
  gets(a);
  if (a[strlen(a) - 1] == 'k') {
    if (a[0] == '5' || a[0] == '6')
      printf("53");
    else
      printf("52");
  } else {
    if (a[0] == '3' && a[1] == '1')
      printf("7");
    else if (a[0] == '3' && a[1] == '0')
      printf("11");
    else
      printf("12");
  }
  return 0;
}
