#include int main(void) { unsigned long long n = 0; std::cin >> n; std::cout << (52*(n - 1) + 316) << std::endl; return 0; }