Background: Kurt Friedrich Godel (UK: , US: ; German: ['kUat 'go:dl] ( listen); April 28, 1906 - January 14, 1978) was an Austrian, and later American, logician, mathematician, and philosopher.
Context: At the age of 18, Godel joined his brother in Vienna and entered the University of Vienna. By that time, he had already mastered university-level mathematics. Although initially intending to study theoretical physics, he also attended courses on mathematics and philosophy. During this time, he adopted ideas of mathematical realism. He read Kant's Metaphysische Anfangsgrunde der Naturwissenschaft, and participated in the Vienna Circle with Moritz Schlick, Hans Hahn, and Rudolf Carnap. Godel then studied number theory, but when he took part in a seminar run by Moritz Schlick which studied Bertrand Russell's book Introduction to Mathematical Philosophy, he became interested in mathematical logic. According to Godel, mathematical logic was "a science prior to all others, which contains the ideas and principles underlying all sciences."  Attending a lecture by David Hilbert in Bologna on completeness and consistency of mathematical systems may have set Godel's life course. In 1928, Hilbert and Wilhelm Ackermann published Grundzuge der theoretischen Logik (Principles of Mathematical Logic), an introduction to first-order logic in which the problem of completeness was posed: Are the axioms of a formal system sufficient to derive every statement that is true in all models of the system?  This became the topic that Godel chose for his doctoral work. In 1929, at the age of 23, he completed his doctoral dissertation under Hans Hahn's supervision. In it, he established the completeness of the first-order predicate calculus (Godel's completeness theorem). He was awarded his doctorate in 1930. His thesis, along with some additional work, was published by the Vienna Academy of Science.
Question: How many years did he study in Vienna?

Answer: