The Smale invariant of a knot