C[i] ← A[i] + B[i] + r jeżeli C[i] ≥ p
C[i] ← C[i] – p r ← 1
C[i] ← C[i] – p
r ← 1
w przeciwnym razie r ← 0 i ← i + 1
r ← 0