#include <cstdint>
#include <iostream>

using ll = int64_t;


int main(){
    ll x,y,m,n,L;
    std::cin>>x>>y>>m>>n>>L;
    if(x==y){
        std::cout<<0<<'\n';
        return 0;
    }else{
        if(m==n){
            std::cout<<"Impossible\n";
            return 0;
        }
    }

    
}