The upper bound on the exponent, ω, of matrix multiplication over a ring that was three in 1968 has decreased several times and since 1986 it has been 2.376. On the other hand, the exponent of the algorithms known for the all pairs shortest path problem has stayed at three all these years even for the very special case of directed graphs with uniform edge lengths. In this paper we give an algorithm of time O nν log3 n , ν = (3 + ω)/2, for the case of edge lengths in {−1, 0, 1}. Thus, for the current known bound on ω, we get a bound on the exponent, ν < 2.688. In case of integer edge lengths with absolute value bounded above by M, the time bound is O (Mn)ν log3 n and the exponent is less than 3 for M = O(nα ), for α < 0.116 and the current bound on ω.