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