#include<stdio.h>
long long ar[100000];
long long lazy[1000000];
long long tree[1000000];
void bt(long long node,long long a,long long b)
{
if(a>b)
return ;
if(a==b)
{
tree[node]=ar[a];
return;
}
bt(1,a,(a+b)/2);
bt(1,(a+b)/2+1,b);
}
void ut(long long node,long long a,long long b,long long i,long long j,long long num)
{
if(lazy[node]!=0)
{
tree[node]=tree[node]+lazy[node];
if(a!=b)
{
lazy[2*node]=lazy[2*node]+lazy[node];
lazy[2*node+1]=lazy[2*node+1]+lazy[node];
}
lazy[node]=0;
}
if(a > b || a > j || b < i)
return;
if(a>=i && b<=j)
{
tree[node]=tree[node]+num;
if(a!=b)
{
lazy[2*node]=lazy[2*node]+num;
lazy[2*node+1]=lazy[2*node+1]+num;
}
return;
}
ut(node*2, a, (a+b)/2, i, j,num);
ut(1+node*2, 1+(a+b)/2, b, i, j,num);
tree[node] = tree[node*2]+tree[node*2+1];
}
int main()
{
long long n,i,x,y,num;
scanf("%lld",&n);
for(i=0;i<n;i++)
scanf("%lld",&ar[i]);
bt(1,0,n-1);
scanf("%lld%lld%lld",&x,&y,&num);
ut(1,0,n-1,x,y,num);
printf("1\n");
}
I2luY2x1ZGU8c3RkaW8uaD4KbG9uZyBsb25nIGFyWzEwMDAwMF07CmxvbmcgbG9uZyBsYXp5WzEwMDAwMDBdOwpsb25nIGxvbmcgdHJlZVsxMDAwMDAwXTsKdm9pZCBidChsb25nIGxvbmcgbm9kZSxsb25nIGxvbmcgYSxsb25nIGxvbmcgYikKewoJaWYoYT5iKQoJcmV0dXJuIDsKCWlmKGE9PWIpCgl7CgkJdHJlZVtub2RlXT1hclthXTsKCQlyZXR1cm47Cgl9CglidCgxLGEsKGErYikvMik7CglidCgxLChhK2IpLzIrMSxiKTsKfQp2b2lkIHV0KGxvbmcgbG9uZyBub2RlLGxvbmcgbG9uZyBhLGxvbmcgbG9uZyBiLGxvbmcgbG9uZyBpLGxvbmcgbG9uZyBqLGxvbmcgbG9uZyBudW0pCnsKCWlmKGxhenlbbm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