var depths: [Int] = [] while let line = readLine() { depths.append(Int(line)!) } var total = 0 for i in 1.. prev { total += 1 } prev = new } print("b:", total0