#include<stdio.h>
int main(void)
{
    int n,h;
    scanf("%d",&n);
    h=((n)/12)*4+2;//根据题意,每一趟需要4分钟,最后一趟仅需2分钟
    printf("%d",h);
    return 0;
}