#include<bits/stdc++.h>
using namespace std;
#define SET(a) memset(a,-1,sizeof(a))
#define CLR(a) memset(a,0,sizeof(a))
#define PI acos(-1.0)
#define MOD 1000000007
#define MX 100000
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);
int tc, kk=1, n, arr[20], x;
bool exist[202];
string s;
char ch;
while(cin>>x && x!=-1)
{
int n=0;
arr[n++]=x;
CLR(exist);
exist[x]=true;
while(cin>>x && x)
{
arr[n++]=x;
exist[x]=true;
}
int cnt=0;
for(int i=0;i<n;i++)
if(exist[arr[i]*2])
cnt++;
cout<< cnt <<"\n";
}
return 0;
}
No comments:
Post a Comment