题目链接:http://bailian.openjudge.cn/practice/3756
# include <stdio.h>
int main()
{
int n,i;
int sum,a[1000];
while(scanf("%d",&n)!=EOF)
{
if(n==0)
break;
sum=(n-2)*180;
for(i=0;i<n-1;i++)
{
scanf("%d",&a[i]);
sum-=a[i];
}
printf("%d\n",sum);
}
return 0;
}