#include <stdio.h>
int tri(int n){
if(n==0)
return 0;
else if(n==1)
return 0;
else if(n==2)
return 1;
else
return tri(n-1)+tri(n-2)+tri(n-3);
}
int main(void) {
// your code goes here
int n=7;
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCB0cmkoaW50IG4pewoJaWYobj09MCkKCQlyZXR1cm4gMDsKCWVsc2UgaWYobj09MSkKCQlyZXR1cm4gMDsKCWVsc2UgaWYobj09MikKCQlyZXR1cm4gMTsKCWVsc2UgCgkJcmV0dXJuIHRyaShuLTEpK3RyaShuLTIpK3RyaShuLTMpOwp9CmludCBtYWluKHZvaWQpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCWludCBuPTc7CglwcmludGYoIiVkIix0cmkobikpOwoJcmV0dXJuIDA7Cn0K