import java.util.Scanner;
public class Main {
public static int[] F = new int[51];
public static int numberOfWays(int n){
F[0] = 0;
F[1] = 1;
F[2] = 1;
F[3] = 2;
F[4] = 3;
if(F[n] > 0) {
return F[n];
} else {
F[n] = numberOfWays(n-2) + numberOfWays(n-3) + numberOfWays(n-4);
}
return F[n];
}
public static void main
(String[] args
){ Scanner sc
= new Scanner
(System.
in); int n = sc.nextInt();
System.
out.
println(numberOfWays
(n
)); }
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKcHVibGljIGNsYXNzIE1haW4gewoJcHVibGljIHN0YXRpYyBpbnRbXSBGID0gbmV3IGludFs1MV07CglwdWJsaWMgc3RhdGljIGludCBudW1iZXJPZldheXMoaW50IG4pewoJCUZbMF0gPSAwOwoJCUZbMV0gPSAxOwoJCUZbMl0gPSAxOwoJCUZbM10gPSAyOwoJCUZbNF0gPSAzOwoJICAgIGlmKEZbbl0gPiAwKSB7CiAgICAJCXJldHVybiBGW25dOwoJCX0gZWxzZSB7CiAgICAJCUZbbl0gPSBudW1iZXJPZldheXMobi0yKSArIG51bWJlck9mV2F5cyhuLTMpICsgbnVtYmVyT2ZXYXlzKG4tNCk7CgkJfQoJCXJldHVybiBGW25dOwoJfQoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpewoJICAgIFNjYW5uZXIgc2MgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIGludCBuID0gc2MubmV4dEludCgpOwoJICAgIFN5c3RlbS5vdXQucHJpbnRsbihudW1iZXJPZldheXMobikpOwoJfQp9Cg==