#include<bits/stdc++.h> using namespace std; int main() { string word1, word2; while( cin>>word1>>word2 ) { int n = word1.size(), m = word2.size(); if( m*n == 0 ) cout<<(m+n)<<endl; int dp[n+1][m+1]; for( int i=0; i<n+1; i++) // 删除操作或插入操作 { dp[i][0] = i; } for( int j...