Adding squared numbers in a loop

ok ill try to explain my problem as best as i can.

Im required to create a program that sums up the squares beginning from 1 to the number the user entered, for example the number is 3 so the output will be 14 (because 1squared +2squared+ 3squared or 1+4+9=14)

so far here is what i got

int num;

System.out.println ("Please enter a number: ");

num = Integer.parseInt(input.readLine());

while (num <= 10){

num = 1*1+2*2+num*num;

System.out.println("The answer is: "+ num);

i know it only prohibits me to only 3 but thats it!