In a psychology school the grade of the students is determined by the following method: At the end of the first year the grade equals to twice the age of the student. From then on, the grade is determined by twice the age of the student plus half of his grade from the previous year. If Joeys grade at the end of the first year is 40, what will be his grade at the end of the third year?