#include int main() { long long n; scanf("%lld", &n); n = 316 + (n - 1) * 52; printf("%lld", n); return 0; }