How to fix Time Limit Exceeded Error : For n (0 < n < 10^9), calculate this Eq 

re=(2^n)%1000000007

but for n=10^9 I take Time Limit Exceeded Error in online judge

What can I do to solve this error ?

    int main()
    {
    int n,i,re=1;
    scanf("%d",&n);
    for(i=0; n>i; i++) re=(2*re)%1000000007;
    printf("%d",re);
    }


