#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  if (s[s.length() - 1] == 'k') {
    if (s[0] == '5' || s[0] == '6')
      cout << 53;
    else
      cout << 52;
  } else if (s[s.length() - 1] == 'h') {
    if ((s[0] == '3' && s[1] == '0'))
      cout << 11;
    else if ((s[0] == '3' && s[1] == '1'))
      cout << 7;
    else
      cout << 12;
  }
  return 0;
}
