import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
//每次电梯乘坐12人,第i+1次是小乐该坐的趟次
int i = n / 12;
int j = n % 12;
//如果 j == 0,则第i次是小乐该坐的趟次
if(j == 0 && n != 0) {
System.out.println(i * 4 - 2);
} else if(j != 0 && n != 0){
System.out.println((i + 1) * 4 - 2);
} else if(n == 0) {
System.out.println(2);
}
}
}