What is wrong in this

#include
using namespace std;
static int a[1000000000];
int main() {
int n,max=0,i;
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[i];
if(a[i]>=max)
{
max=a[i];
}
}
cout<<max;
return 0;
}

hi mayank,
your code is almost correct.
Try running your code for all negative numbers.
Please Let me know if you need any other help.