#include<stdio.h>
int main(void)
{
int count=1;
int i=70;
while(count<500)
{
count = 1;
int a= 2;
int b = (i+1)*i/2;
while (b > 1)
{
int t = 0;
while (b % a == 0)
{
b = b/a;
t++;
}
count *= t+1;
a++;
}
i++;
}
printf("%d", (i-1)*i/2);
}