#include <stdio.h>
int rec(int n){
if(n==0){
return 3;
}
else if(n==1){
return 0;
}
else if(n==2){
return 2;
}
else{
return rec(n-2)+rec(n-3);
}
}
int main(void) {
int n = 50,k;
for(int i = 0; i <= n; i++){
k=rec(n)%n;
if (k==0){
return 0;
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCByZWMoaW50IG4pewoJaWYobj09MCl7CgkJcmV0dXJuIDM7Cgl9CgllbHNlIGlmKG49PTEpewoJCXJldHVybiAwOwoJfQoJZWxzZSBpZihuPT0yKXsKCQlyZXR1cm4gMjsKCX0KCWVsc2V7CgkJcmV0dXJuIHJlYyhuLTIpK3JlYyhuLTMpOwoJfQogCn0KIAppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgbiA9IDUwLGs7IAogICAgZm9yKGludCBpID0gMDsgaSA8PSBuOyBpKyspewogICAgCWs9cmVjKG4pJW47CiAgICAJaWYgKGs9PTApewogICAgCQlwcmludGYoIiVkLCAiLHJlYyhpKSk7CglyZXR1cm4gMDsKICAgIAl9CiAgICB9Cn0=