#include<stdio.h> #include<math.h> void main() { double i,s,n,sum=0; i=1; s=2; scanf("%lf",&n); while(i<=n) { sum=sum+s; s=s+2*pow(10,i); i++; } printf("sum=%lf\n",sum); }