import java.util.Scanner;
class Main {
public static void main
(String[] args
) { Scanner sc
= new Scanner
(System.
in); int n = sc.nextInt();
int[] F = new int[51];
F[0] = 0;
F[1] = 1;
F[2] = 1;
F[3] = 2;
F[4] = 3;
for(int i = 5; i <= n; i++) {
F[i] = F[i-2] + F[i-3] + F[i-4];
}
}
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKY2xhc3MgTWFpbiB7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgewoJICAgIFNjYW5uZXIgc2MgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIGludCBuID0gc2MubmV4dEludCgpOwoJICAgIGludFtdIEYgPSBuZXcgaW50WzUxXTsKCSAgICBGWzBdID0gMDsKCSAgICBGWzFdID0gMTsKCSAgICBGWzJdID0gMTsKCSAgICBGWzNdID0gMjsKCSAgICBGWzRdID0gMzsKCSAgICBmb3IoaW50IGkgPSA1OyBpIDw9IG47IGkrKykgewoJICAgICAgIEZbaV0gPSBGW2ktMl0gKyBGW2ktM10gKyBGW2ktNF07CgkgICAgfQoJICAgIFN5c3RlbS5vdXQucHJpbnRsbihGW25dKTsKCX0KfQ==