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