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