#include <iostream>
using namespace std;
int main()
{
int n, max = -100000000;
cin >> n;
int a[n];
for (int i = 1; i <= n; i++)
{
cin >> a[i];
if (a[i] > max)
{
max = a[i];
}
}
cout << "max = " << max << ", pozitii ";
for (int i = 1; i <= n; i++)
{
if (a[i] == max)
{
cout << i << " ";
}
}
return 0;
}