1 #define mm(a) memset(a,0,sizeof(a)); 2 #define max(x,y) (x)>(y)?(x):(y) 3 #define min(x,y) (x)<(y)?(x):(y) 4 #define Fopen freopen("1.in","r",stdin); freopen("m.out","w",stdout); 5 #define rep(i,a,b) for(ll i=(a);i<=(b);i++) 6 #define per(i,b,a) for(ll i=(b);i>=(a);i--) 7 #include<bits/stdc++.h> 8 typedef long long ll; 9 #define PII pair<ll,ll> 10 using namespace std; 11 const int INF=0x3f3f3f3f; 12 const int MAXN=(int)2e6+5; 13 14 int dp[MAXN]={1},a[MAXN]; 15 int n; 16 int main() 17 { 18 // scanf("%d",&n); 19 dp[1]=1; 20 int x; 21 while(~scanf("%d",&x))a[++n]=x; 22 for(int i=1;i<=n;i++){ 23 if(!dp[i])continue; 24 for(int j=0;j<=a[i];j++){ 25 dp[i+j]=1; 26 } 27 } 28 // printf("%d ",n); 29 printf("%s ",dp[n]?"true":"false"); 30 return 0; 31 }