#include <stdio.h>
int main() {
    int n, minute;
    scanf("%d", &n);
    minute = 2 + (n / 12) * 4;
    printf("%d", minute);
    return 0;
}