A peaceful river's lake, just a rumor, began the secret power, the world pattern change slowly, mention who can yitianjian and tulongdao can be at the helm of the world, at this time of the world has become volatile, chaotic lean, there has been a xiaoxia at the helm of the dream of the world, so he decided to set up its own forces, but also constantly looking for a yitianjian and tulongdao, with the forces of xiaoxia growing, one day a man rides a donkey said he konws yitianjian and tulongdao where abouts, the man decided to study the power of xiaoxai, and then out of the question, the first day two silver wine he can drink 1, the second day will drink 3 ,The third day is two times the first day plus three times the second day,Day n is twice as much as day n minus 2 plus three times as much as day n minus 1(a[n] = a[n-1]*3 + a[n-2]*2),I asked you what the number is on day n
输入描述:
Multiple sets of input
a[1]=1,a[2]=3;
M = 1e5;
The input give a number n(1<n<1e9)