Why is this failing two test cases

int main () {
int n;
cin>>n;

int a=1, b=2, c=0;
for (int i = 3; i <=n ; ++i) {
    c=(a+b)%mod;
    a=b%mod;
    b=c;
}
cout<<c;
return 0;

}

hello @Realnam332
use long long

Actually I forgot case where n=2 or 1. Taking int is not a problem.