#include void main() { int N; scanf("%d", &N); printf("%d", 368 + (52 * N)); }