#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
getline(cin,s);
for(int i=0;s[i];i++)
{
if(s[i]==‘@‘)
{
string c;
i++;
for(;s[i];i++)
if(s[i]>=‘A‘&&s[i]<=‘Z‘||s[i]>=‘a‘&&s[i]<=‘z‘)
c+=s[i];
else break;
if(c.length())
{cout<<c<<" ";}
if(s[i]==‘@‘)i--;
}
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
int a[N],b[N];
int main()
{
int n;
scanf("%d",&n);
for(int i=1; i<=n; i++)
{
scanf("%d",&a[i]);
b[i]=a[i]+b[i-1];
}
b[n+1]=-1;
int s=0;
for(int i=n; i>0; i--)
{
b[i]=max(b[i+1],a[i]);
s+=b[i]-a[i];
}
printf("%d",s);
return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
LL A[2][2], B[2][2], C[2][2], n;
const LL MD = 1e9+7;
struct MX
{
int v[2][2];
void O()
{
memset(v,0,sizeof(v));
}
void E()
{
memset(v,0,sizeof(v));
for (int i = 0; i < 2; ++i)
v[i][i] = 1;
}
MX operator * (const MX &b) const
{
MX c;
c.O();
for (int k = 0; k < 2; ++k)
{
for (int i = 0; i < 2; ++i)
if (v[i][k])
{
for (int j = 0; j < 2; ++j)
{
c.v[i][j] = (c.v[i][j] + (LL)v[i][k] * b.v[k][j]) % MD;
}
}
}
return c;
}
MX operator ^ (LL p) const
{
MX y;
y.E();
MX x;
memcpy(x.v, v, sizeof(v));
while (p)
{
if (p & 1)y = y * x;
x = x * x;
p >>= 1;
}
return y;
}
} a, b, c;
int main()
{
a.O();
a.v[0][0] = 1;
a.v[0][1] = 1;
b.O();
b.v[0][0] = 1;
b.v[0][1] = 1;
b.v[1][0] = 1;
b.v[1][1] = 2;
LL n;
while (cin>>n)
{
cout<<(a * (b ^ (n - 1))).v[0][1]<<endl;
}
return 0;
}