#include #include #include #include #include #include using namespace std; int main(){ int n;scanf("%d",&n); double a=4,a1=3,a2; if(n==0){ printf("4\n");return 0; } else if(n==1){ printf("3\n");return 0; } for(int i=2;i<=n;i++){ a2=(19*a1-12.0*a)/4.0; a=a1; a1=a2; if(a2<(double)1e-9){ a2=0; break; } } if(a2==0)printf("0\n"); else printf("%0.10f\n",a2); //else printf("%0.10f\n",a2); return 0; }