#include<stdio.h>
void
matrix_mul(long long int fibo[2][2],long long int whatever[2][2],long long int temp[2][2])
{
int i,j,k;
int sum=0;
for(k=0;k<2;k++)
{
for(i=0;i<2;i++)
{
sum=0;
for(j=0;j<2;j++)
{
sum+=fibo[k][j]*whatever[j][i];
}
temp[k][i]=sum;
}
}
}
int
main()
{
long long int fibo[2][2]={{1,1},
{1,0}};
long long int previous[2][2]={{1,1},
{1,0}};
long long int temp[2][2]={{0,0},
{0,0}};
int n;
int i,j;
n=n-1;
while(n)
{
if(n%2==1)
{
matrix_mul(fibo,previous,temp);
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
previous[i][j]=temp[i][j];
}
}
}
matrix_mul(fibo,fibo,temp);
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
fibo[i][j]=temp[i][j];
}
}
n=n/2;
}
printf("%lld",previous
[0][0]);
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4Kdm9pZAptYXRyaXhfbXVsKGxvbmcgbG9uZyBpbnQgZmlib1syXVsyXSxsb25nIGxvbmcgaW50IHdoYXRldmVyWzJdWzJdLGxvbmcgbG9uZyBpbnQgdGVtcFsyXVsyXSkKewoJaW50IGksaixrOwoJaW50IHN1bT0wOwogZm9yKGs9MDtrPDI7aysrKQoJewoJCWZvcihpPTA7aTwyO2krKykKCQl7CgkJCQlzdW09MDsKCQkJCWZvcihqPTA7ajwyO2orKykKCQkJCXsKCQkJCQlzdW0rPWZpYm9ba11bal0qd2hhdGV2ZXJbal1baV07CgkJCQkJfQoJCQkJdGVtcFtrXVtpXT1zdW07CgkJCX0KCQl9Cgl9CmludAptYWluKCkKewoJbG9uZyBsb25nIGludCBmaWJvWzJdWzJdPXt7MSwxfSwKCQkJCQkJCSAgezEsMH19OwogICAgbG9uZyBsb25nIGludCBwcmV2aW91c1syXVsyXT17ezEsMX0sCgkJCQkJICAgCQkJIHsxLDB9fTsKCWxvbmcgbG9uZyBpbnQgIHRlbXBbMl1bMl09e3swLDB9LAoJ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