Help required, SPOJ

I get WA from MAIN74 - Euclids algorithm revisited on SPOJ.com . I need your help, please…
Link of problem: https://www.spoj.com/problems/MAIN74/
My solution:

#include <bits/stdc++.h>
#define PII pair<ll,ll>
typedef long long ll;

using namespace std;

const ll EPS=1e9+7;

PII fib(ll n)
{
if(n==0)
return {0, 1};

auto p=fib(n >> 1);
int c=((p.first%EPS)*((2*(p.second%EPS))%EPS-p.first%EPS)%EPS)%EPS;
int d=((p.first%EPS)*(p.first%EPS))%EPS+((p.second%EPS)*(p.second%EPS))%EPS;
if(n&1)
    return {d, (c + d)%EPS};
else
    return {c, d};

}

int main()
{
ll t,n;
cin>>t;
while(t–)
{
cin>>n;
PII ans=fib(n+1);
if(n==0)
cout<<1<<endl;
else if(n==1)
cout<<2<<endl;
else
cout<<(ans.first%EPS+ans.second%EPS)%EPS<<endl;
}
return 0;
}

Please help me to find my mistake…PLEASE…