#include <stdio.h>
//a(30)の値は2496122と表示された。
int main() {
int n=30,a[31],i;
a[0]=2;
a[1]=-1;
for (i=2;i<=n;i++){
a[i]=-a[i-1]+a[i-2]+2;
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgovL2EoMzAp44Gu5YCk44GvMjQ5NjEyMuOBqOihqOekuuOBleOCjOOBn+OAggoKaW50IG1haW4oKSB7CiAgICBpbnQgbj0zMCxhWzMxXSxpOyAKCiAgICBhWzBdPTI7CiAgICBhWzFdPS0xOwoKICAgIGZvciAoaT0yO2k8PW47aSsrKXsKICAgICAgICBhW2ldPS1hW2ktMV0rYVtpLTJdKzI7CiAgICB9CgogICAgCiAgICBwcmludGYoImEoMzAp44Gu5YCk44GvJWRcbiIsYVszMF0pOwoKICAgIHJldHVybiAwOwp9