#include <stdio.h>

int main(void) {
	// your code goes here
	int i=100,a,b,c;
	while(i<=999)
{
	a=i/100;
	b=i/10%10;
	c=i%10;
	if(a*a*a+b*b*b+c*c*c==i)
	{
		printf("%d",i);
	}
	i++;
}
	return 0;
}
