#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int a, b, cnt = 0, sum = 0, i, j, hand, flag = 0, c, n, m, k, t, res,
            maxy = 0, miny = 12345678910;
  cin >> n;
  string str;
  getline(cin, str);
  int len = str.size();
  if (str[len - 1] == 'k') {
    if (n == 5 || n == 6)
      printf("53\n");
    else
      printf("52");
  } else if (str[len - 1] == 'h') {
    if (n == 30)
      printf("11");
    else if (n < 30)
      printf("12");
    else
      printf("7");
  }
}
